RFR: 8228988: AnnotationParser throws NullPointerException on incompatible member type [v2]

Rafael Winterhalter winterhalter at openjdk.java.net
Mon Nov 16 11:55:20 UTC 2020


> If an annotation member type is changed in an incompatible manner, the `AnnotationParser` currently throws a `NullPointerException` if:
> 
> - An enumeration-typed member is changed to be an annotation type or a `Class` type.
> - An annotation type is changed to be a non-annotation type.
> 
> This patch creates `AnnotationTypeMismatchExceptionProxy` to give users a better error message and to delay the exception to the time where the annotation member is attempted to be accessed.

Rafael Winterhalter has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:

  8228988: AnnotationParser throws NullPointerException on incompatible member type

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

Changes: https://git.openjdk.java.net/jdk/pull/725/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=725&range=01
  Stats: 174 lines in 3 files changed: 170 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/725.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/725/head:pull/725

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


More information about the core-libs-dev mailing list