Annotations on anonymous classes

Steve Sides steve.sides at oracle.com
Mon Feb 18 11:46:04 PST 2013


On 2/18/2013 11:38 AM, Steve Sides wrote:
> On 2/17/2013 8:50 PM, Werner Dietl wrote:
>> I finished implementing the changed handling for anonymous classes, as
>> described by Alex in:
>>
>> http://mail.openjdk.java.net/pipermail/type-annotations-spec-experts/2013-February/000063.html 
>>
>>
>> Steve/SQE: I only added one simple test to newlocations:
>> http://hg.openjdk.java.net/type-annotations/type-annotations/langtools/file/dbef4179abd8/test/tools/javac/annotations/typeAnnotations/newlocations/AnonymousClass.java 
>>
>>
>> I tested that the annotations end up in the right locations using javap.
>> None of the existing test styles seemed suitable to test for
>> annotations on an anonymous class.
>>
>> Please do expand the tests and let me know if you see any issues with 
>> this.
>>
>> cu, WMD.
>>
> There are some in CombinationsTargetTest1.java (case4), but they are 
> currently @ignore'd.
> I have a webrev posted for tl/langtools which cleans up these tests so 
> they will be run and not ignored.
> It factors the failing cases out of test 1 so it runs completely. If 
> filters the failing cases out of test2 (too many to factor out).
>
> I recently added a couple more test cases to Combinations*2.java 
> covering fields and methods.
I should have said,  if add tests cases for "fields and methods in 
anonymous classes".
-steve
> I had posted some at http://cr.openjdk.java.net/~ssides/tests/ 
> (TestAnonInner*.java), but they were not posted as webrevs. :/
> Last week, I incorporated them into one of the Combinations tests 
> Friday, but it would be smoother if the aforementioned webrev were 
> push first.
>
> -steve



More information about the type-annotations-dev mailing list