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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7
    • Fix Version/s: 8
    • Component/s: core-libs
    • Labels:

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: