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

JSR 308 type annotations not visible when processing java source files starting b70

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 7
    • core-libs

      The JSR 308 type annotations on type parameters are not visible when doing the
      annotation processing of java *source* files starting b70. For example, if I compile the sample class T below and run my simple annotation processor (source attached) that prints the contents of a processed java class, then the "@X" annotation on the "A" type variable is not printed out:

      ====
      import java.lang.annotation.*;

      @Retention(RetentionPolicy.RUNTIME)
      @interface X {}

      public class T {
           public <@X A> void foo() {}
      }
      ====

      # jdk7_b70/bin/javac MyProcessor.java T.java
      # jdk7_b70/bin/javac -processor MyProcessor T.java
      TypeParam: A
      TypeParamAnnotation:

      However, the annotation processing of the java source works fine with b64 - b69:

      # jdk7_69/bin/javac -processor MyProcessor T.java
      TypeParam: A
      TypeParamAnnotation: @X

            jfranck Joel Borggrén-Franck (Inactive)
            agavrilosunw Alexey Gavrilov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: