Community
Participate
Working Groups
I'm using eclipse-SDK-I20041201-win32.zip. Annotations are not recongnized as extending java.lang.annotations.Annotation interface. The following attribute declaration and class results in the following errors in the problems view (as copied from problem view, except date has been replaced from russian to english one): Severity Description Resource In Folder Location Creation Time 2 Bound mismatch: The generic method getAnnotation(Class<A>) of type Class<T> is not applicable for the arguments (Class<Attr>) since the type Attr is not a valid substitute for the bounded parameter <A extends Annotation> TestCls3.java test-1.5/src/test line 5 2 Dec 2004. 20:52:25 -------- test/Attr.java ------------ package test; import java.lang.annotation.*; @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) public @interface Attr { public int tst() default -1; } ---- test/TestCls3.java --- package test; @Attr public class TestCls3 { public static void main(String args[]) { Attr v = TestCls.class.getAnnotation(Attr.class); } }
I believe this is fixed in HEAD. I will double-check
The code compiles fine in latest, but due to bug 80014, v is null. Close as duplicate of bug 80014. *** This bug has been marked as a duplicate of 80014 ***
*** Bug 80088 has been marked as a duplicate of this bug. ***
Verified for 3.1 M4 using build I200412142000.