Community
Participate
Working Groups
I'm getting an Internal compiler error when trying to rebuild ASM code from the HEAD using Eclipse 3.1M4. Exception is below. ASM CVS repository is at: cvs -d:pserver:anonymous@cvs.forge.objectweb.org:/cvsroot/asm login cvs -z3 -d:pserver:anonymous@cvs.forge.objectweb.org:/cvsroot/asm co asm and here is the Java code that cause this issue (as it said in error log) ---- package annotations; @ValuesAnnotation( byteValue = 1, charValue = 'A', booleanValue = true, intValue = 1, shortValue = 1, longValue = 1L, floatValue = 1.0f, doubleValue = 1.0d, stringValue = "A", enumValue = ValuesEnum.ONE, annotationValue = @ValueAttrAnnotation( "annotation"), classValue = Values.class, byteArrayValue = { 1, -1}, charArrayValue = { 'c', 'b', (char)-1}, booleanArrayValue = {true, false}, intArrayValue = { 1, -1}, shortArrayValue = { (short)1, (short)-1}, longArrayValue = { 1L, -1L}, floatArrayValue = { 1.0f, -1.0f}, doubleArrayValue = { 1.0d, -1.0d}, stringArrayValue = { "aa", "bb"}, enumArrayValue = {ValuesEnum.ONE, ValuesEnum.TWO}, annotationArrayValue = {@ValueAttrAnnotation( "annotation1"), @ValueAttrAnnotation( "annotation2")}, classArrayValue = {Values.class, Values.class} ) @ValueAttrAnnotation1( "classAnnotation1") @ValueAttrAnnotation2( "classAnnotation2") public class Values { @ValueAttrAnnotation1( "fieldAnnotation1") @ValueAttrAnnotation2( "fieldAnnotation2") public String testfield = "test"; @ValueAttrAnnotation1( "methodAnnotation1") @ValueAttrAnnotation2( "methodAnnotation2") @ValueAttrAnnotation() public void testMethod( @ValueAttrAnnotation1( "param1Annotation1") @ValueAttrAnnotation2( "param1Annotation2") String param1, @ValueAttrAnnotation1( "param2Annotation1") @ValueAttrAnnotation2( "param2Annotation2") int param2) { // @ValueAttrAnnotation( "codeAnnotation") } } ---- ------------- 2 Internal compiler error java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.ast.Annotation.resolveType(Annotation.java:204) at org.eclipse.jdt.internal.compiler.ast.ASTNode.resolveAnnotations(ASTNode.java:398) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:928) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1063) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:280) at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:510) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:335) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:215) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:165) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:49) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:212) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:135) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:574) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044) at org.eclipse.core.runtime.Platform.run(Platform.java:747) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:158) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:192) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:221) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044) at org.eclipse.core.runtime.Platform.run(Platform.java:747) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:224) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:243) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:272) at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:198) at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:190) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66) Values.java asm/test/conform/annotations line 0 December 22,
Reproduced. Added AnnotationTest#test104. The annotation analysis did not perform well when attributes were sorted differently from annotation member methods.
Fixed
Thanks Philippe! Do you know when it will go into the nightly builds? There was no new builds for last 2 weeks.
It just missed today's integration build. There should be a nightly build tonight afaik. As a workaround, simply ensure that the annotation attributes appear in same order as the member declarations in annotation type.
Since today's build got delayed, we can release this fix for today's integration build.
That is great. Thanks Philippe.
*** Bug 81670 has been marked as a duplicate of this bug. ***
*** Bug 81957 has been marked as a duplicate of this bug. ***
*** Bug 82474 has been marked as a duplicate of this bug. ***
*** Bug 82448 has been marked as a duplicate of this bug. ***
*** Bug 83158 has been marked as a duplicate of this bug. ***
*** Bug 84764 has been marked as a duplicate of this bug. ***
Verified in I20050214