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

AnnotationParser throws NullPointerException on incompatible member type

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • 17
    • 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

              winterhalter Rafael Winterhalter
              winterhalter Rafael Winterhalter
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: