Review request for 8055063: Parameter#toString() fails w/ AIOOBE for ctr of inner class w/ generic type
eric.mccorkle at oracle.com
Mon Nov 3 21:34:23 UTC 2014
This issue is an 8u40 issue, so it needs to be reviewed ASAP in order to
backport it in time.
On 10/31/14 12:15, Eric McCorkle wrote:
> Please review this patch which fixes issues that arise with
> getGenericParameterTypes() and getAnnotatedParameterTypes() when there
> are generic signatures and synthetic parameters.
> Please note that a complete fix is not possible for all cases. See
> discussion on https://bugs.openjdk.java.net/browse/JDK-8062582 for details.
> This patch will cause Executable.getAnnotatedParameterTypes(),
> Parameter.getAnnotatedType(), and Parameter.getParameterizedType() to
> report the correct types in the following cases:
> * No generic signature is present.
> * Both a generic signature and method parameters information are present
> * A generic signature is present, but method parameters information is
> not present, but the number of parameters in the generic signature and
> the number of parameters in the method descriptor are the same.
> In the problematic case, where there is a generic signature, no method
> parameters information, and the generic signature does not match the
> method descriptor, these methods will return the correct /non/-generic
> type, as there is no general way of associating parameters in the
> generic signature with those in the method descriptor in this case.
> Please also note that there is currently a bug in javac which causes
> type annotations' parameter indexes to be wrong when synthetic
> parameters are generated: https://bugs.openjdk.java.net/browse/JDK-8029012.
> The bug report is here:
> The webrev is here:
More information about the core-libs-dev