-
Bug
-
Resolution: Fixed
-
P2
-
6
-
b06
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2152449 | OpenJDK6 | Jonathan Gibbons | P3 | Resolved | Fixed | b03 |
These changes to java.lang.Override were not integrated:
@@ -9,16 +9,30 @@
import java.lang.annotation.*;
/**
* Indicates that a method declaration is intended to override a
- * method declaration in a superclass. If a method is annotated with
- * this annotation type but does not override a superclass method,
- * compilers are required to generate an error message.
+ * method declaration in a supertype. If a method is annotated with
+ * this annotation type compilers are required to generate an error
+ * message unless either of the following conditions hold:
+ *
+ * <ul>
+ * <li>
+ * The method does override or implement a method declared in a
+ * supertype.
+ * </li>
+ * <li>
+ * The method has a signature that is override-equivalent to that
+ * of any public or protected method declared in {@linkplain
+ * Object}.
+ * </li>
+ * </ul>
*
* @author Joshua Bloch
+ * @author Peter von der Ahé
* @since 1.5
+ * @jls3 9.6.1.4 Override
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.SOURCE)
public @interface Override {
}
@@ -9,16 +9,30 @@
import java.lang.annotation.*;
/**
* Indicates that a method declaration is intended to override a
- * method declaration in a superclass. If a method is annotated with
- * this annotation type but does not override a superclass method,
- * compilers are required to generate an error message.
+ * method declaration in a supertype. If a method is annotated with
+ * this annotation type compilers are required to generate an error
+ * message unless either of the following conditions hold:
+ *
+ * <ul>
+ * <li>
+ * The method does override or implement a method declared in a
+ * supertype.
+ * </li>
+ * <li>
+ * The method has a signature that is override-equivalent to that
+ * of any public or protected method declared in {@linkplain
+ * Object}.
+ * </li>
+ * </ul>
*
* @author Joshua Bloch
+ * @author Peter von der Ahé
* @since 1.5
+ * @jls3 9.6.1.4 Override
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.SOURCE)
public @interface Override {
}
- backported by
-
JDK-2152449 Specification of java.lang.Override was not updated when integrating 6399361
- Resolved
- relates to
-
JDK-6954234 JDK 1.6 @Override: Implementation different from Specification
- Closed
-
JDK-6399361 CONFORMANCE: @Override specification and compiler inconsistent
- Closed
-
JDK-6586965 Request of formal documentation about Override annotation
- Closed