RFR: 8228988: AnnotationParser throws NullPointerException on incompatible member type
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. ------------- Commit messages: - 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=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8228988 Stats: 10 lines in 1 file changed: 6 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
On Sun, 18 Oct 2020 22:21:37 GMT, Rafael Winterhalter <winterhalter@openjdk.org> wrote:
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.
Commenting to avoid automatic closing. ------------- PR: https://git.openjdk.java.net/jdk/pull/725
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
On Sun, 18 Oct 2020 22:21:37 GMT, Rafael Winterhalter <winterhalter@openjdk.org> wrote:
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.
This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/725
participants (1)
-
Rafael Winterhalter