Bug 314766

Summary: NPE when using aop.xml for compile time config
Product: [Tools] AspectJ Reporter: Andrew Clement <aclement>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P2    
Version: 1.6.9M2   
Target Milestone: 1.6.9   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
project exhibiting npe none

Description Andrew Clement CLA 2010-05-27 15:47:56 EDT
Reported on the list:

java.lang.NullPointerException
at org.aspectj.weaver.bcel.BcelWorld.isAspectIncluded(BcelWorld.java:942)
at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:80)
at org.aspectj.weaver.Advice.match(Advice.java:106)
at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:149)
at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:3108)
at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2562)
Comment 1 Andrew Clement CLA 2010-05-27 15:48:30 EDT
Created attachment 170256 [details]
project exhibiting npe
Comment 2 Andrew Clement CLA 2010-05-27 16:13:21 EDT
just another case of an advice that wasn't having the declaring type set.  It never used to matter, but it does now if using xml configuration as we use the declaring type to see if the aspect has been included in any aop.xml.

In this case the advice was the entry point to cflow: AdviceKind.CflowEntry

fix in Advice.makeCflowEntry to set the declaring type.