Community
Participate
Working Groups
build I20041201 + jdtcore head 1)Open java.lang.annonation.Retention.class The attached source is @Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.ANNOTATION_TYPE) public @interface Retention { RetentionPolicy value(); } 2) select "Target" 3) do F3 nothing the problem is inside org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader#getKind(). The code is public int getKind() { int modifiers = getModifiers(); if ((modifiers & AccInterface) != 0) return IGenericType.INTERFACE_DECL; if ((modifiers & AccEnum) != 0) return IGenericType.ENUM_DECL; return IGenericType.CLASS_DECL; } and must be public int getKind() { int modifiers = getModifiers(); if ((modifiers & AccAnnotation) != 0) return IGenericType.ANNOTATION_TYPE_DECL; if ((modifiers & AccInterface) != 0) return IGenericType.INTERFACE_DECL; if ((modifiers & AccEnum) != 0) return IGenericType.ENUM_DECL; return IGenericType.CLASS_DECL; }
Fixed and released in HEAD. Thanks for the patch. Regression test added in AnnotationTest.test047.
Verified for 3.1 M4 using build I200412142000.