RFR: 8266791: Annotation property which is compiled as an array property but changed to a single element throws NullPointerException [v3]
David Holmes
dholmes at openjdk.java.net
Thu Jun 10 04:20:14 UTC 2021
On Wed, 9 Jun 2021 13:56:40 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 refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.
test/jdk/java/lang/annotation/AnnotationTypeMismatchException/ArityTypeMismatchTest.java line 2:
> 1: /*
> 2: * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
Copyright year is wrong.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3940
More information about the core-libs-dev
mailing list