Skip to main content

build 62: package annotations + annotation processing broken

1 reply [Last post]
patrikbeno
Offline
Joined: 2004-10-11
Points: 0

I posted a bug report recently... anyway:

got following error:

<br />
warning: No annotation processors claimed present annotation types: [javax.annotation.processing.SupportedAnnotationType<br />
s, bug.Annotated]<br />
src\bug\package-info.java:1: incompatible types<br />
found   : bug.Annotated<br />
required: java.lang.annotation.Annotation<br />
@Annotated<br />
 ^<br />

simplified test case:
package-info.java:

<br />
@bug.Annotated<br />
package bug;<br />

now if you have don't use annotation processing (-proc:none or no annotation processors detected), everything's ok

with annotation processing enabled, you're lost.
compiler fails with mysterious error message(see above)

Message was edited by: patrikbeno

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
patrikbeno
Offline
Joined: 2004-10-11
Points: 0

when package-info.java is comiled by mustang javac with -target 1.5, resulting class file cannot by loaded by java5 runtime:
[code]
Exception in thread "main" java.lang.ClassFormatError: Illegal class modifiers in class incubator/compiler/package-info: 0x1600
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at java.lang.Package.getPackageInfo(Package.java:350)
at java.lang.Package.getAnnotations(Package.java:371)
at incubator.compiler.PackageInfoLoadTest.main(PackageInfoLoadTest.java:18)
[/code]