Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8027181 Type Annotations Cleanup
  3. JDK-8027261

Single codepath for attaching annotations to symbols

XMLWordPrintable

    • 8
    • b19
    • Not verified

      Presently, there are two separate codepaths for attaching type annotations to symbols. Annotations on a base type will be attached by TypeAnnotations.separateAnnotationsKinds, while annotations on arrays, method parameters, and type parameters are attached by TypeAnnotations.findPosition/resolveFrame.

      In the following example:

      public $A int @B [];

      @A will be attached by separateAnnotationsKinds, while @B will be attached by resolveFrame/findPosition.

      This leads to confusion, errors, and unmaintainable code. There should be a single path for attaching annotations.

            emc Eric Mccorkle
            emc Eric Mccorkle
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: