Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334328

Summary: NPE in parserbridge whilst playing with Spring Data projects
Product: [Tools] AJDT Reporter: Andrew Clement <aclement>
Component: CoreAssignee: AJDT-inbox <AJDT-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: andrew.eisenberg
Version: 2.1.2   
Target Milestone: 2.1.3   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Andrew Clement CLA 2011-01-13 17:53:59 EST
Can't quite tell at which point it happened, was browsing NodeEntity and searching for references.

java.lang.NullPointerException
	at org.eclipse.ajdt.core.parserbridge.ITDInserter.createConstructor(ITDInserter.java:305)
	at org.eclipse.ajdt.core.parserbridge.ITDInserter.augmentType(ITDInserter.java:149)
	at org.eclipse.ajdt.core.parserbridge.ITDInserter.visit(ITDInserter.java:108)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1249)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:692)
	at org.eclipse.ajdt.core.codeconversion.ITDAwareLookupEnvironment.completeTypeBindings(ITDAwareLookupEnvironment.java:43)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1141)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1223)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1340)
	at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:94)
	at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:231)
	at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:515)
	at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:582)
	at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:144)
	at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:91)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Andrew Eisenberg CLA 2011-01-13 19:01:29 EST
This is in the code that adds ITD constructors to the type being reconciled.  It looks like a parameter name is null.  This is probably coming in from a jar file.  

And actually, looking at the corresponding method to add methods, I see that this problem is already fixed there.

The fix is easy enough to create, although if this is not affecting your work substantially, I will wait until ITIT support is completed before committing.  This is because the affected source file is also affected by ITIT support.
Comment 2 Andrew Eisenberg CLA 2011-04-26 21:59:32 EDT
Fix is now available.