spec clarification: wildcard array element signature
Liam Miller-Cushon
cushon at google.com
Thu Nov 3 00:29:59 UTC 2016
On Wed, Nov 2, 2016 at 2:28 PM, Alex Buckley <alex.buckley at oracle.com>
wrote:
> Liam, are you calling Field.getGenericType() on i and getting a surprising
> result, perhaps a ParameterizedType whose getActualTypeArguments() blows up?
I noticed this because it crashes ASM [1], not because of an issue with
reflection. But accessing it reflectively as you describe does blow up:
((ParameterizedType)
Test.class.getField("i").getGenericType()).getActualTypeArguments()
...
GenericSignatureFormatError: Signature Parse error: Expected Field Type
Signature
Remaining input: *>.I;
at
sun.reflect.generics.parser.SignatureParser.error(SignatureParser.java:124)
at
sun.reflect.generics.parser.SignatureParser.parseFieldTypeSignature(SignatureParser.java:297)
If you're interested in pursuing the first option Maurizio described, I'd
be happy to help assess the compatibility impact on our code.
[1]
http://forge.ow2.org/tracker/?func=detail&aid=317776&group_id=23&atid=100023
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20161102/ff59aaf2/attachment-0001.html>
More information about the compiler-dev
mailing list