RFR[9]: 8158510: Add test cases to validate Annotation

shilpi.rastogi at oracle.com shilpi.rastogi at oracle.com
Tue Jul 5 06:18:12 UTC 2016


Hi All,

Please review updated webrev 
http://cr.openjdk.java.net/~srastogi/8158510/webrev.03/

Regards,
Shilpi

On 7/1/2016 5:11 PM, shilpi.rastogi at oracle.com wrote:
> Thanks Paul !!
>
> Please see http://cr.openjdk.java.net/~srastogi/8158510/webrev.01/
>
> Regards,
> Shilpi
>
> On 7/1/2016 3:12 PM, Paul Sandoz wrote:
>> Hi Shilpi,
>>
>> There is more going on here than just the test since you have 
>> modified the annotation processing to throw an ISE for an annotation 
>> type that contains one or more methods that do not define elements. 
>> That behaviour might be too restrictive.
>>
>> This is a grey area and implementation specific but i would tend to 
>> be cautious and avoid changing the current behaviour. Note that the 
>> original issue was due to javac adding a synthetic de-sugared method 
>> for a lambda. We don’t know if other byte code generators might do 
>> something different.
>>
>> So my recommendation is to limit the testing to the current set of 
>> possible failures.
>>
>> Paul.
>>
>>> On 1 Jul 2016, at 10:15, shilpi.rastogi at oracle.com 
>>> <mailto:shilpi.rastogi at oracle.com> wrote:
>>>
>>> Hi All,
>>>
>>> Please review https://bugs.openjdk.java.net/browse/JDK-8158510
>>> *Problem:* How to validate annotation, as javac does not allow us to 
>>> write wrong annotation so how should we test valid annotation at 
>>> runtime?
>>>
>>> http://cr.openjdk.java.net/~srastogi/8158510/webrev.00/
>>> *Solution:* To test this i used ASM tool and modified the classfile 
>>> with wrong annotation (not allowed at javac level) and wrote test 
>>> cases.
>>>
>>> Thanks,
>>> Shilpi
>>
>



More information about the core-libs-dev mailing list