Bug 32182 - NPE performing search
Summary: NPE performing search
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: Other other
: P3 normal (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-18 17:12 EST by Jared Burns CLA
Modified: 2003-03-11 09:09 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Burns CLA 2003-02-18 17:12:19 EST
Build 20030218

I performed a Java search with "* Color *" as the text to search for method
declarations in the workspace. The following NPE occurred:

!SESSION Feb 18, 2003 16:09:36.332 ---------------------------------------------
java.fullversion=J2RE 1.3.1 IBM build cxia32131-20020410 (JIT enabled: jitc)
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86 -debug -dev bin -data /home/jburns/target -install file:/home/jburns/host/eclipse/
!ENTRY org.eclipse.jdt.ui 4 10001 Feb 18, 2003 16:09:36.333
!MESSAGE Internal Error
!STACK 0
java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
	at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.getMethods(SourceTypeBinding.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.getExactConstructor(SourceTypeBinding.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.lookup.BlockScope.getConstructor(BlockScope.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.ast.AllocationExpression.resolveType(AllocationExpression.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.resolve(FieldDeclaration.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java(Compiled Code))
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator2.process(MatchLocator2.java:976)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator2.locateMatches(MatchLocator2.java:687)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator2.locateMatches(MatchLocator2.java(Compiled Code))
	at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:471)
	at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute(JavaSearchOperation.java:86)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:65)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1588)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:79)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:95)
Comment 1 Jerome Lanneluc CLA 2003-02-19 02:51:37 EST
It looks like bug 31985, but this is fixed in I20030218. Are you sure you're 
using I20030218?
Comment 2 Jerome Lanneluc CLA 2003-02-19 04:43:46 EST
Sorry, I was able to reproduce with I20030218. I will investigate.
Comment 3 Jerome Lanneluc CLA 2003-02-19 08:53:35 EST
PotentialMatch.getMainTypeName() was returning an incorrect type name in the 
case of secondary type. This caused bindings to not be set and thus the NPE.

Fixed.
Comment 4 David Audel CLA 2003-03-11 09:09:09 EST
Verified.