Name: gm110360 Date: 03/30/2004
FULL PRODUCT VERSION :
I've a package level annotation in package-info.java. When I compile it, the compiler parses the file but does not emit a package-name.package-info synthetic interface as stated in the JSR-175 Public Draft Specification.
ADDITIONAL OS VERSION INFORMATION :
Windows XP
EXTRA RELEVANT SYSTEM CONFIGURATION :
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
A DESCRIPTION OF THE PROBLEM :
compile a package-info.java file
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
a class file package-name.package-info.class
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The compiler does not generate package-name.package-info.class file.
ACTUAL -
The comipler parses the package-info.java file but does not emit the synthetic interface.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/* Trademark.java */
package njunit;
import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
public @interface Trademark {
String description();
String owner();
}
/*License.java*/
package njunit;
import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE,ElementType.PACKAGE})
public @interface License {
String name();
String notice();
boolean redistributable();
Trademark[] trademarks();
}
/*package-info.java*/
@License(
name = "Apache",
notice = "license notice ........",
redistributable = true,
trademarks = {
@Trademark(description="abcd",owner="xyz"),
@Trademark(description="efgh",owner="klmn")
}
)
package njunit;
---------- END SOURCE ----------
(Incident Review ID: 245542)
======================================================================
- duplicates
-
JDK-4979738 Package annotations are not emitted as per spec
-
- Resolved
-