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

Details

    • Sub-task
    • Resolution: Fixed
    • P2
    • 9
    • 8
    • tools
    • b19
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: