-
Bug
-
Resolution: Fixed
-
P5
-
5.0, 6
-
b86
-
x86
-
windows_xp
-
Verified
A DESCRIPTION OF THE PROBLEM :
@Override indicates that a method declaration is intended to not only override but also implement a method declaration in a superclass.
http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.4.3
-----
abstract class C1 {
public void m1() {
}
public abstract void m2();
}
class C2 extends C1 {
@Override
public void m1() {
}
@Override
public void m2() {
}
}
-----
Please revise the documentation (http://download.java.net/jdk6/docs/api/java/lang/Override.html) or the implementation.
The JLS should explain it more strictly, too.
http://java.sun.com/docs/books/jls/third_edition/html/interfaces.html#9.6.1.4
REPRODUCIBILITY :
This bug can be reproduced always.
- duplicates
-
JDK-6326485 Compiler does not enforce rule that interfaces may not use @Override
-
- Closed
-
- relates to
-
JDK-6501053 Specification of java.lang.Override was not updated when integrating 6399361
-
- Closed
-
-
JDK-6409362 A non-abstract method does not override an abstract one
-
- Closed
-
-
JDK-6424261 Description of "override" in JLS 3 section 6.4.3 is misleading.
-
- Closed
-
-
JDK-5008260 @Override should be generalized from 'superclass' to 'supertype'
-
- Closed
-
-
JDK-6954234 JDK 1.6 @Override: Implementation different from Specification
-
- Closed
-
-
JDK-6709448 CONFORMANCE:@Override specification and compiler inconsistent 2
-
- Closed
-