Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8013065

type-annotations in anon classes are written are regular annotations

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: tools

      Description

      In this case,
      class TestOne<T> { // TestN.class
           Object mtest( TestOne<T> t){ return null; }

          public void test() {
              mtest( new TestOne<T>() { // TestN$1
                      class InnerAnon<U> { // TestN$1$InnerAnon.class
                          @F String ia_m1(){ return null; };
                      }
                      InnerAnon<String> IA = new InnerAnon< String>();
                 });
         }
      }
      @Retention(RUNTIME) @Target(TYPE_USE) @interface F { }

      @F is written to class file as a regular annotation on ia_m1().

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ssides Steve Sides
                Reporter:
                ssides Steve Sides
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: