Code review request for 8007113 Upgrade AnnotatedElement.isAnnotionPresent to be a default method
joe.darcy at oracle.com
Fri Feb 1 07:18:35 UTC 2013
On 01/31/2013 11:08 PM, Chris Hegarty wrote:
> This looks good to me Joe, and I like that the default method spells
> out its implementation.
> Out of curiosity, strictly speaking is this considered a specification
> change? Since the public override methods no longer exist in the
> concrete classes.
The specification change here is the default-ness of the
isAnnotationPresent method in AnnotatedElement; that delta will be
covered by JCK signature tests. Putting aside how the classes
implementing AnnotatedElement look via core reflection, the set of
methods in the implementations of AnnotatedElement and their behavior at
runtime will be unchanged so that aspects of the fix is not a
specification change. Preserving the details of the core reflection
view is generally outside of our compatibility contract for java SE;
this change should be fully source and binary compatible.
Thanks for the review,
> On 02/01/2013 03:21 AM, Joe Darcy wrote:
>> I'd like to upgrade the existing AnnotatedElement.isAnnotationPresent
>> interface method to a default method:
>> 8007113 Upgrade AnnotatedElement.isAnnotionPresent to be a default
>> This ends up removing several copies of the same logic in the JDK; all
>> reflection and annotations regression test pass with this change.
More information about the core-libs-dev