RFR 8154270: javac wrongly rejects some class literals as annotation element values

Liam Miller-Cushon cushon at google.com
Thu Apr 21 23:59:28 UTC 2016

Thanks for the review! The updated patch is attached.

> * since the issue can be exposed in two ways (reflection and separate
> compilation), I'd like to see two tests; you have one for reflection -
> having also the other for separate compilation would be great (since that
> area tends to get neglected)

To confirm, do you mean the "javac -implicit:none Other.java" example in
the original thread? I added that to the test.

I also thought about testing against a bad class file, but that doesn't
exercise anything in the patch and I don't have a good way to generate a
class with the problem (ASM won't write classes with this issue, and now
javac won't either).

> * I'm not a lawyer - and I'm not sure whether the copyright header in your
> test is correct ;-)

Oops. Any concerns with using the same header (except for the date) as
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20160421/eedb094d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8154270.patch
Type: text/x-patch
Size: 4702 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20160421/eedb094d/8154270-0001.patch>

More information about the compiler-dev mailing list