Community
Participate
Working Groups
Build ID: I20080207-1530 Steps To Reproduce: 1. Create a new package, 'example' 2. Create a java file, 'example/package-info.java' 3. Include the following contents @Deprecated @Deprecated package example; Expected result: this should be flagged as an error. On a class, this would (correctly) cause 'Duplicate annotation @Deprecated'; on package-info, however, Eclipse ignores it. However on trying to access the package annotations in the Sun JVM at runtime, you'll get: java.lang.annotation.AnnotationFormatError: Duplicate annotation for class: interface java.lang.Deprecated: @java.lang.Deprecated() at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:75) at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52) at java.lang.Class.initAnnotationsIfNecessary(Class.java:3072) at java.lang.Class.getAnnotation(Class.java:3029) at java.lang.Class.isAnnotationPresent(Class.java:3042) at java.lang.Package.isAnnotationPresent(Package.java:376) etc. More information:
Added AnnotationTest.test266() Was fixed by the changes for bug 258906 Test released for 3.5M5
Verified for 3.5M5 using I20090126-1300