JDK 8 RFR: 8009267: Restore isAnnotationPresent methods in public AnnotatedElement implementations
Joe Darcy
joe.darcy at oracle.com
Sat Mar 2 02:06:15 UTC 2013
Hello,
The changes pushed under
8007113: Upgrade AnnotatedElement.isAnnotionPresent to be a default
method
http://hg.openjdk.java.net/jdk8/tl/jdk/rev/e04467fa13af
combined with how javac currently models default methods under pre-JDK-8
source versions can result in some source compatibility impacts for
those using JDK 8 to compile under older source versions if the
recommended practice of setting the bootclasspath is not followed. [1]
To mitigate these impacts, I'm proposing the changes in
8009267: Restore isAnnotationPresent methods in public
AnnotatedElement implementations
http://cr.openjdk.java.net/~darcy/8009267.1/
which have the effect of restoring a concrete isAnnotationPresent method
to Class, Package, Field, Method, and Constructor. The implementation
delegates to the default method on the AnnotatedElement interface.
Thanks,
-Joe
[1]
http://mail.openjdk.java.net/pipermail/compiler-dev/2013-February/005738.html
More information about the core-libs-dev
mailing list