RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expected

2013-10-16 Thread Andreas Lundblad
Hi, Please review the fix for JDK-8004912 and JDK-8019420 below. Description: The behavior of Class.get[Declared]AnnotationsByType was wrong. These methods delegate to sun.reflect.annotation.AnnotationSupport which has been rewritten. NonInheritableContainee.java is added and contains the test

Re: RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expected

2013-10-21 Thread Andreas Lundblad
- getAnnotationsByType is not working as expected Hi, Please review the fix for JDK-8004912 and JDK-8019420 below. Description: The behavior of Class.get[Declared]AnnotationsByType was wrong. These methods delegate to sun.reflect.annotation.AnnotationSupport which has been rewritten

Re: RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expected

2013-10-22 Thread Joel Borggrén-Franck
s > > > - Original Message - > From: andreas.lundb...@oracle.com > To: core-libs-dev@openjdk.java.net > Sent: Wednesday, October 16, 2013 4:00:08 PM GMT +01:00 Amsterdam / Berlin / > Bern / Rome / Stockholm / Vienna > Subject: RFR: 8004912: Repeating annotations - ge

Re: RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expected

2013-10-22 Thread Andreas Lundblad
On Tue 22 Oct 2013 12:21:36 PM CEST, Joel Borggrén-Franck wrote: Hi Andreas, A few nits: Class.java: import java.util.Collection; +import java.util.Collections; import java.util.HashSet; unused import. Right. Thanks. AnnotationSupport.java: +/** + * Equivalent to calling {@c

Re: RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expected

2013-10-22 Thread Peter Levart
8 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expected Hi, Please review the fix for JDK-8004912 and JDK-8019420 below. Description: The behavior of Class.get[Declared]AnnotationsByType w

Re: RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expected

2013-10-22 Thread Joel Borggrén-Franck
>>> >>> - A new test has been added to test the above behavior. >>> >>> best regards, >>> Andreas >>> >>> >>> - Original Message - >>> From: andreas.lundb...@oracle.com >>> To: core-lib

Re: RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expected

2013-10-22 Thread Peter Levart
eys in the given map of annotations. - A new test has been added to test the above behavior. best regards, Andreas - Original Message - From: andreas.lundb...@oracle.com To: core-libs-dev@openjdk.java.net Sent: Wednesday, October 16, 2013 4:00:08 PM GMT +01:00 Amsterdam / Berlin /

Re: RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expected

2013-10-22 Thread Peter Levart
reas ----- Original Message ----- From:andreas.lundb...@oracle.com To:core-libs-dev@openjdk.java.net Sent: Wednesday, October 16, 2013 4:00:08 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expect

Re: RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expected

2013-10-22 Thread Peter Levart
Hi, In the spec. document: http://cr.openjdk.java.net/~abuckley/8misc.pdf on page 11, chapter 1.2 the following: When the new get[Declared]AnnotationsByType(Class) methods are called for a repeatable annotation type T, the question is how t

Re: RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expected

2013-10-22 Thread Joel Borggrén-Franck
Regards, Peter >>>> >>>> On 10/22/2013 12:21 PM, Joel Borggrén-Franck wrote: >>>> >>>>> Hi Andreas, >>>>> >>>>> A few nits: >>>>> >>>>> Class.java: >>>>> >>

Re: RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expected

2013-10-22 Thread Alex Buckley
The text you quoted ("When the new...") is a high-level explanation - a policy - of how Core Reflection should work. The text then proceeds to give definitions suitable for the API spec: "This policy for Java SE 8 is reified in the following definitions: ...". Alex On 10/22/2013 7:06 AM, Pete

Re: RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expected

2013-10-23 Thread Andreas Lundblad
On 10/22/2013 03:20 PM, Peter Levart wrote: I think the problem could be solved in two ways: - by explicitly scanning the inheritance chain for the 1st class that has the annotations of type T present directly or indirectly (by containment). - by "canonicalizing" the representation of the re

Re: RFR: 8004912: Repeating annotations - getAnnotationsByType is not working as expected

2013-10-24 Thread Peter Levart
Hi Andreas, I think this is correct now. By coincidence, Joe Darcy is trying to implement default methods in interface AnnotatedElement and I think those two attempts could be merged. The s.r.a.AnnotationSupport static methods: getDirectlyAndIndirectlyPresent & getAssociatedAnnotations could