Community
Participate
Working Groups
Build Identifier: Version: Indigo Service Release 2 Build id: 20120216-1857 java.lang.NullPointerException at org.aspectj.org.eclipse.jdt.internal.compiler.ast.SwitchStatement.analyseCode(SwitchStatement.java:118) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:104) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:730) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseC ... oBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Compile error: NullPointerException thrown: null Reproducible: Always Steps to Reproduce: 1. After updating the eclipse plugin
Showstopper for me. There is no way to workaround other than just letting maven do the work. Back to Eclipse 3.6 .
I found the issue. Empty Switch statements seems to cause the problem. switch(stuff) { } We had left the switch statement there and had commented some of the code out and forgot to remove the whole switch statement. While it seems to be legally java it seems to break aspectj.
thanks for discovering that - that's invaluable info!
Great Guys.. So when can we get the update (relief), or is there a way to use older version on Eclipse 3.7
if that is the issue, hopefully in a few hours I'll have something out. (just gotta get through some meetings)
I guess there is a little more to it as this simple program doesn't seem to fail for me: === public class CC { public static void main(String[] args) { int i=4; switch (i) { } } } ===
Got it, the thing being switched on had to be an enum: enum Color { R,G,B; } public class C { public void foo() { Color c; switch (c) { } } }
fix committed into AspectJ and into AJDT - should be in a dev build in 2 hours.