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

Joel Borggrén-Franck jfranck at openjdk.java.net
Thu Jun 10 12:23:19 UTC 2021


On Thu, 10 Jun 2021 08:36:42 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`.
>
> Rafael Winterhalter has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
> 
>  - 8266791: Annotation property which is compiled as an array property but changed to a single element throws NullPointerException
>  - 8266766: Arrays of types that cannot be an annotation member do not yield exceptions

Marked as reviewed by jfranck (Reviewer).

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

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


More information about the core-libs-dev mailing list