Community
Participate
Working Groups
While working on bug 296044, I found that the compiler was throwing an excepiton under this code: in default package AnnotAspect.aj: @SuppressWarnings("nls") public aspect AnnotAspect { declare @field : * AnnotDemo.* : @Demo(myValues={"alfa", "beta", "gamma"}); } class AnnotDemo { // that works fine in the java class //@Demo(myValues={"alfa", "beta", "gamma"}) private int annotateMe; } in default package Demo.java: public @interface Demo { Class[] myValues() default { }; } Note that the declare declaration uses strings and the @interface requires classes. Exception is this: java.lang.NullPointerException at org.aspectj.ajdt.internal.core.builder.AsmHierarchyBuilder.visit(AsmHierarchyBuilder.java:548) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:214) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1246) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUni ... AutoBuildJob.run(AutoBuildJob.java:238) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
likely dup of bug 293457 which is already fixed. Will add a testcase for this to confirm.
added a regression test based on the code here, passes fine, i really think it is the same problem that I fixed under the other bug. *** This bug has been marked as a duplicate of bug 293457 ***