Bug 155347

Summary: NPE during compilation of class file with pointcuts
Product: [Tools] AspectJ Reporter: Ron Bodkin <rbodkin+LISTS>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: aclement
Version: DEVELOPMENT   
Target Milestone: 1.6.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Ron Bodkin CLA 2006-08-27 18:46:07 EDT
I commented out a static nested aspect inside a class to let me do a rename refactoring in Eclipse. This results in the following exception, which even a full rebuild won't fix. The class does have pointcut definitions inside of it. Commenting those out avoids the problem (though it caused other syntax errors...)

java.lang.ArrayIndexOutOfBoundsException
at org.aspectj.weaver.patterns.IfPointcut.findResidueInternal(IfPointcut.java:186)
at org.aspectj.weaver.patterns.Pointcut.findResidue(Pointcut.java:269)
at org.aspectj.weaver.patterns.AndPointcut.findResidueInternal(AndPointcut.java:93)
at org.aspectj.weaver.patterns.Pointcut.findResidue(Pointcut.java:269)
at org.aspectj.weaver.patterns.AndPointcut.findResidueInternal(AndPointcut.java:93)
at or ... ses 
when weaving 
when batch building BuildConfig[C:\devel\glassbox\.metadata\.plugins\org.eclipse.ajdt.core\glassboxAgent.generated.lst] #Files=210
Comment 1 Ron Bodkin CLA 2006-08-27 18:46:32 EDT
The file does have an .aj extension
Comment 2 Matthew Webster CLA 2006-08-30 05:18:07 EDT
Could you post the testcase.
Comment 3 Ron Bodkin CLA 2006-08-31 01:48:58 EDT
I'll work on narrowing it down, but probably won't have time until next week.
Comment 4 Andrew Clement CLA 2007-10-25 05:09:05 EDT
quick look for 1.5.4
Comment 5 Andrew Clement CLA 2008-06-10 16:48:52 EDT
added guard to fire if we ever see this again and include a bit more context in the error message.