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

Single codepath for attaching annotations to symbols

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Version:
      8
    • Resolved In Build:
      b19
    • Verification:
      Not verified

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: