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

Vicente Romero vromero at openjdk.java.net
Thu Dec 16 17:52:24 UTC 2021


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 it is always working on type annotations on parameters, but it is also invoked to extract type annotations applied to exception types for example.

TIA

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

Commit messages:
 - 8213905: Reflection, TYPE_USE annotation on THROWS on inner class constructor, Java 9+

Changes: https://git.openjdk.java.net/jdk/pull/6869/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6869&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8213905
  Stats: 16 lines in 2 files changed: 11 ins; 1 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6869.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6869/head:pull/6869

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


More information about the core-libs-dev mailing list