JDK-6880086 : regression: JSR 308 type annotations on type parameters are not visible processing class files
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2009-09-08
  • Updated: 2010-05-10
  • Resolved: 2009-09-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7Resolved
Related Reports
Duplicate :  
Relates :  
Description
From Alexey Gavrilov:

I've noticed that JSR 308 type annotations on type parameters are not
visible when doing the annotation processing of java *class* files. For
example, if I compile the sample class T below and run my simple
annotation processor that prints contents on the 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 {
@X
public <@X A> void foo() {}
}
====

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

However, the annotation processing of the java source works fine:

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

Comments
EVALUATION Root cause appears to be the fix for 6861837: JCK compilation failures
08-09-2009