Community
Participate
Working Groups
java.lang.NullPointerException at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ImplicitNullAnnotationVerifier.checkImplicitNullAnnotations(ImplicitNullAnnotationVerifier.java:97) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:832) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:1020) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.Abstract ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
Looks like scope is null at that line. I'll probably need some sample code to trigger it in order to fix it. It is possible a JDT upgrade will also fix it (since that will pick up lots of fixes in the underlying compiler) but that isn't due until closer to Neon release.
>I'll probably need some sample code to trigger it in order to fix it. It is big internal project. Think it is not possible :( Will try. >It is possible a JDT upgrade will also fix it. Not sure that understand it correct. But anyway: the Eclipse a going under Java 8 (1.8.0_74) the target JVM is Java 6.
>> It is possible a JDT upgrade will also fix it. > Not sure that understand it correct. But anyway: the Eclipse a going under Java 8 (1.8.0_74) the target JVM is Java 6. Inside AspectJ is a modified version of the Eclipse JDT compiler. The Eclipse JDT compiler receives fixes over time. They are not instantly applied to AspectJ, they are picked up during periodic updates to AspectJ that pick up the latest version of the JDT compiler. The problem you are seeing may occur in AspectJ but is in fact a JDT issue. If JDT have fixed it and we rebase AspectJ on that version, you'd pick up the fix too.
The error still exists in Eclipse Neon.1 (4.6.1). May by the following will help. The error appears only while "Enable annotation-based null analysis" is enabled.
I've just upgraded AspectJ to a recent JDT (Neon.1 and a bit) so the 1.8.10 release will include all their latest fixes. As I can't recreate this, I can't tell if it will fix the problem but it'll be worth trying when the release happens (in a few days time I think).
AJDT dev builds for 4.6 and AspectJ 1.8.10 now include Neon.2, which may affect this.
Today I updated to the lates ajdt (Version: 1.8.10.201612122115, Version: 2.2.4.201612122115) Similar effect: java.lang.NullPointerException at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.evaluateNullAnnotations(SourceTypeBinding.java:2202) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode.resolveAnnotations(ASTNode.java:710) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.getAnnotationTagBits(SourceTypeBinding.java:1082) at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAda ... oBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Compile error: NullPointerException thrown: null
thanks for trying that out. I'll have another look when I get a moment but without testcode that triggers it, might be tough to properly address.