JDK 8 RFR: 8009267: Restore isAnnotationPresent methods in public AnnotatedElement implementations (original) (raw)

Uwe Schindler uschindler at apache.org
Sat Mar 2 22:34:30 UTC 2013


Looks good to me! Are this the only methods in the corelib that were removed in favour of a default implementation in the interface?

Uwe


Uwe Schindler uschindler at apache.org Apache Lucene PMC Member / Committer Bremen, Germany http://lucene.apache.org/

-----Original Message----- From: Joe Darcy [mailto:joe.darcy at oracle.com] Sent: Saturday, March 02, 2013 3:06 AM To: Core-Libs-Dev Cc: Jonathan Gibbons; Alexander Buckley; Maurizio Cimadamore; uschindler at apache.org Subject: JDK 8 RFR: 8009267: Restore isAnnotationPresent methods in public AnnotatedElement implementations

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