Bug 352948

Summary: NullPointerException at BcelClassWeaver.addInitializer
Product: [Tools] AspectJ Reporter: Lambert Busmann <lambert.busmann>
Component: IDEAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: aclement
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
the aj file creating the Nullpointerexception
none
the corrected version none

Description Lambert Busmann CLA 2011-07-24 09:35:24 EDT
Eclipse Indigo AJDT 2.13

When editing a aj-file, i receive the folloing exception

java.lang.NullPointerException
at org.aspectj.weaver.bcel.BcelClassWeaver.addInitializer(BcelClassWeaver.java:247)
at org.aspectj.weaver.bcel.BcelTypeMunger.mungeNewField(BcelTypeMunger.java:1917)
at org.aspectj.weaver.bcel.BcelTypeMunger.munge(BcelTypeMunger.java:105)
at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:434)
at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:100)
at org.aspectj.weav ... ing ()Ljava/lang/String;
                    ARETURN
  end public String toString()
end abstract class ...


Short time before, two projects have benn added to the inPath of the project and, because it is a maven project, to the pom.xml. 

in the aj-file a parent is declared implementing a interface.
   declare parents: INode implements IBlueprintItem

Both INode and IBlueprintItem are interfaces. 

The aj.file is attached to this bug.
Comment 1 Lambert Busmann CLA 2011-07-24 09:37:22 EDT
Created attachment 200241 [details]
the aj file creating the Nullpointerexception
Comment 2 Andrew Clement CLA 2011-07-25 16:31:38 EDT
Does this keep happening?  Or was it just a one off occurrence?
Is INode a generic type?
Comment 3 Lambert Busmann CLA 2011-07-27 05:14:09 EDT
Created attachment 200433 [details]
the corrected version
Comment 4 Lambert Busmann CLA 2011-07-27 05:14:31 EDT
INode is a generic type (Inode<VC, EC, E extends Enum<E>>):

the newly attached file works. The difference is that the declared methods now are bound to INode and not to IBluePrintItem.