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`.

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

Commit messages:
 - 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

Changes: https://git.openjdk.java.net/jdk/pull/3940/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3940&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8266791
  Stats: 218 lines in 3 files changed: 216 ins; 1 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3940.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3940/head:pull/3940

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

Reply via email to