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

Incorrect annotation attributes for type annotations on constructor type parameters

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 9
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b19
    • Verification:
      Not verified

      Description

      The following code should generate RuntimeVisibleTypeAnnotations attributes the method m, annotating the new instruction as well as the constructor invocation.

      import java.lang.annotation.*;

      @Retention(RetentionPolicy.RUNTIME)
      @Target(ElementType.TYPE_USE)
      @interface X {}
      interface Foo<T> {}
      class Test { void m() { new Foo<@X String>() {}; } }

      At present, neither are generated.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: