Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8228988

AnnotationParser throws NullPointerException on incompatible member type

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs

      Description

      The AnnotationParser throws a NullPointerException upon parsing an annotation member that is itself an annotation value where the annotation type is itself not defined as an annotation type during runtime. This should yield an IncompatibleClassChangeError. The exception occurs due to "parseAnnotation2" returning null upon encountering an incompatible value. The calling code does however not check for this condition and attempts the generation of a proxy for the incompatible annotation of the value's result by calling result.getClass() what yields that exception.

      The null pointer indicates that the value itself cannot be described as an annotation value such that the proxy should be built on the annotation property type.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                winterhalter Rafael Winterhalter
                Reporter:
                winterhalter Rafael Winterhalter
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: