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

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • 8
    • tools
    • b19
    • Not verified

      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.

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

              Created:
              Updated:
              Resolved: