JDK 8 (initial) RFR for JDK-8005294 : Consider default methods for additions to AnnotatedElement

Joe Darcy joe.darcy at oracle.com
Fri Oct 25 18:21:51 UTC 2013


On 10/25/2013 03:29 AM, Peter Levart wrote:
>
> Hi Joe,
>
> So, the order must be respected, right.
>
> There's a bug. I think you wanted to call:
>
> ((Class) this).getSuperclass()
>
> Instead of:
>
> thisClass.getSuperclass()
>
> ...which would always return Object.class...
>

Right; thanks catching that.

Time to start writing the tests :-)

-Joe

> Regards, Peter
>
> On Oct 25, 2013 10:40 AM, "Joe Darcy" <joe.darcy at oracle.com 
> <mailto:joe.darcy at oracle.com>> wrote:
>
>     Hi Joel and Peter,
>
>     On 10/24/2013 07:10 AM, Peter Levart wrote:
>>     Hi Joe,
>>
>>     I see two problems with the implementation in
>>     *AnnotatedElementSupport*. The first is the treatment of
>>     declared-only annotations where the code returns either directly
>>     present or in-directly present repeatable annotations, but not
>>     both. So in the following example:
>>
>>     @Ann(1)
>>     @AnnCont({@Ann(2), @Ann(3)})
>>
>>     it will only return [@Ann(1)], but I think it should return all
>>     of them [@Ann(1), @Ann(2), @Ann(3)] - does the spec. define that?
>>
>
>     [snip]
>
>     From your feedback (and a closer reading of the specifciation),
>     I've reworked the specifications and implemenations of the default
>     methods for get[Declared]AnnotationsByType:
>
>     http://cr.openjdk.java.net/~darcy/8005294.2/
>     <http://cr.openjdk.java.net/%7Edarcy/8005294.2/>
>
>     Tests still need to be written, but this implementation should be
>     much closed to what is needed.
>
>     Thanks,
>
>     -Joe
>




More information about the core-libs-dev mailing list