[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Review request (XS): 7022100: Method annotations are incorrectly set when redefining classes
From:       stefan.karlsson () oracle ! com (Stefan Karlsson)
Date:       2012-01-29 23:42:11
Message-ID: 4F25D953.70406 () oracle ! com
[Download RAW message or body]

On 2012-01-27 14:30, David Holmes wrote:
> On 27/01/2012 11:12 PM, Stefan Karlsson wrote:
>> Here's a fix for a simple copy-n-past bug in the handling of
>> annotations, affecting only class redefinition.
>>
>> http://cr.openjdk.java.net/~stefank/7022100/webrev.00/
>>
>> 7022100: Method annotations are incorrectly set when redefining classes
>> Summary: Changed to the correct annotation arrays
>> Reviewed-by: TBD1, TBD2
>
> Looks perfectly logical, but begs the question as to how this has not 
> been discovered. Are there no tests in this area?

I don't think so. This code is only exercised if you redefine a class 
under the following conditions:
1) The class has overloaded functions,
2) these functions have parameter annotations,
3) the redefined class has swapped the order of these functions (or 
added another overloaded function).

I've managed to write a test for the set_method_parameter_annotations, I 
just need to figure out how to push it to a suitable test suite.

I couldn't come up with a test case fore the 
set_method_default_annotations case. These annotations are only used 
together with methods in an Annotation class. Since annotation methods 
are not allowed to have parameters, I can't induce condition (3) above.

thanks,
StefanK

>
> David


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic