RFR: 8266791: Annotation property which is compiled as an array property but changed to a single element throws NullPointerException

Rafael Winterhalter winterhalter at openjdk.java.net
Mon May 10 13:35:27 UTC 2021


On Sun, 9 May 2021 21:59:29 GMT, Rafael Winterhalter <winterhalter at openjdk.org> wrote:

> During annotation parsing, the parser assumes that a declared property is of an array type if the parsed annotation property is defined as an array. In this case, the component type is `null`, and a `NullPointerException` is thrown. This change discovers the mismatch and throws an `AnnotationTypeMismatchException`.

I implemented this change on top of https://bugs.openjdk.java.net/browse/JDK-8266766 to avoid replicating most of that pull requests changes.

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

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


More information about the core-libs-dev mailing list