Remodel TypeAnnotation to "has" instead of "be" an Annotation

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 24
    • Affects Version/s: 24
    • Component/s: core-libs
    • None

      `java.lang.classfile.TypeAnnotation` currently extends `Annotation`. This opens up opportunities for misuse, such as passing a `TypeAnnotation` into `AnnotationValue.OfAnnotation`, where the type information will be lost. And this modeling causes some difficulty in writing to bytes.

      Therefore, I suggest remodeling `TypeAnnotation` to have an `Annotation annotation()` method to prevent such problems.

            Assignee:
            Chen Liang
            Reporter:
            Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: