Bug 117552

Summary: [WaitingOnAJDTdrop]ValidateAtAspectJAnnotationsVisitor.java:243 Npe when saving aspect file
Product: [Tools] AspectJ Reporter: Mario Scalas <mario.scalas>
Component: CompilerAssignee: Andrew Clement <aclement>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: P3    
Version: 1.5.0M5   
Target Milestone: 1.5.0RC1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Test eclipse project none

Description Mario Scalas CLA 2005-11-22 14:29:15 EST
[I believe that this error follows the fix for number 116890.]

I've installed the 1.3.0.20051122083228 for Eclipse 3.1 release: the problems is still here but someway reduced. A clean build, infact, works flawless (no exception is thrown): but If i modify the aspect file (say add a newline and save) the exception will be thrown). 

The stacktrace:

java.lang.NullPointerException
at org.aspectj.ajdt.internal.compiler.ast.ValidateAtAspectJAnnotationsVisitor.validateAspectDeclaration(ValidateAtAspectJAnnotationsVisitor.java:243)
at org.aspectj.ajdt.internal.compiler.ast.ValidateAtAspectJAnnotationsVisitor.checkTypeDeclaration(ValidateAtAspectJAnnotationsVisitor.java:119)
at org.aspectj.ajdt.internal.compiler.ast.ValidateAtAspectJAnnotationsVisitor.visit(ValidateAtAspectJAnnotationsVisitor.java:107)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1157)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:339)
at org.aspectj.ajdt.internal.compiler.AjCompilerAdapter.beforeAnalysing(AjCompilerAdapter.java:154)
at org.aspectj.ajdt.internal.compiler.CompilerAdapter.ajc$before$org_aspectj_ajdt_internal_compiler_CompilerAdapter$7$db78446d(CompilerAdapter.aj:101)
at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:517)
at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:329)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:809)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:254)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.incrementalBuild(AjBuildManager.java:163)
at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:117)
at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191)

NullPointerException thrown: null

I'm adding the sample eclipse 3.1 project I'm using as a testcase (See the comment in NewAspectImpl.java for reference).
Comment 1 Mario Scalas CLA 2005-11-22 14:30:03 EST
Created attachment 30406 [details]
Test eclipse project
Comment 2 Matt Chapman CLA 2005-11-22 19:08:06 EST
Passing over to AspectJ
Comment 3 Andrew Clement CLA 2005-11-23 03:35:58 EST
Already fixed in AspectJ - fix not yet in AJDT.
Comment 4 Andrew Clement CLA 2005-11-24 05:35:57 EST
Fix is in the latest 1.3 version of AJDT.