RFR: 8213905: reflection not working for type annotations applied to exception types in the inner class constructor

Jan Lahoda jlahoda at openjdk.java.net
Fri Jan 21 12:44:48 UTC 2022


On Thu, 16 Dec 2021 17:44:04 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> Hi,
> 
> Please review this change that is fixing a bug in reflection in particular in `sun.reflect.annotation.TypeAnnotationParser::buildAnnotatedTypes` the current code is assuming that for inner class constructors, there are only type annotations on parameters, but it is also invoked to extract type annotations applied to exception types for example. This bug affects the behavior of method: `java.lang.reflect.Executable::getAnnotatedExceptionTypes` which is not behaving according to its specification. Given that this fix affects the behavior of a method belonging to our API a CSR has been filed too. Please review it at [JDK-8278926](https://bugs.openjdk.java.net/browse/JDK-8278926).
> 
> TIA

To me, looks good.

-------------

Marked as reviewed by jlahoda (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/6869


More information about the core-libs-dev mailing list