RFR: 8228988: AnnotationParser throws NullPointerException on incompatible member type
Rafael Winterhalter
winterhalter at openjdk.java.net
Mon Nov 16 06:21:55 UTC 2020
On Sun, 18 Oct 2020 22:21:37 GMT, Rafael Winterhalter <winterhalter at 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
More information about the core-libs-dev
mailing list