By Dkildahl -Oracle on Jun 01, 2011
Back in May, I described how we would update the specification and implementation of @Override. Unfortunately, I messed up when integrating the changes and the specification of
@Override was not updated. The compiler's behavior is changed but the documentation does not reflect that.
I will make sure to get the documentation fixed in JDK 7 as soon as possible but it is more problematic updating the documentation of JDK 6 because JSR 270 has been finalized. In the meantime, here is what it was supposed to have looked like:
Indicates that a method declaration is intended to override a 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:
- The method does override or implement a method declared in a supertype.
- The method has a signature that is override-equivalent to that of any public or protected method declared in Object.
In case Bruce is still reading my blog, I just want to make it perfectly clear that Joe had absolutely nothing to do with this snafu.