Bug 155347 - NPE during compilation of class file with pointcuts
Summary: NPE during compilation of class file with pointcuts
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 1.6.1   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-27 18:46 EDT by Ron Bodkin CLA
Modified: 2008-06-10 16:48 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.