Bug 24630 - NPE in MethodBinding
Summary: NPE in MethodBinding
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-10 10:31 EDT by Darin Wright CLA
Modified: 2002-10-17 10:33 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2002-10-10 10:31:27 EDT
I noticed that code assist stopped working in my compilation unit I was 
editing, and then found this in the log:

!ENTRY org.eclipse.ui 4 4 Oct 10, 2002 09:56:05.316
!MESSAGE Unhandled exception caught in event loop.
!ENTRY org.eclipse.ui 4 0 Oct 10, 2002 09:56:05.326
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.core.dom.MethodBinding.getKey(MethodBinding.java:145)
	at org.eclipse.jdt.core.dom.DefaultBindingResolver.resolveMethod
(DefaultBindingResolver.java:396)
	at org.eclipse.jdt.core.dom.MethodDeclaration.resolveBinding
(MethodDeclaration.java:441)
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:722)
	at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations
(ASTConverter.java:230)
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:169)
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:69)
	at org.eclipse.jdt.core.dom.AST.parseCompilationUnit(AST.java:241)
	at 
org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation.findTy
peReferences(OrganizeImportsOperation.java:569)
	at 
org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation.run
(OrganizeImportsOperation.java:516)
	at org.eclipse.jdt.internal.core.BatchOperation.executeOperation
(BatchOperation.java:34)
	at org.eclipse.jdt.internal.core.JavaModelOperation.execute
(JavaModelOperation.java:320)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run
(JavaModelOperation.java:620)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1378)
	at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:2154)
	at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run
(WorkbenchRunnableAdapter.java:34)
	at 
org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext$BusyRunnable.inter
nalRun(BusyIndicatorRunnableContext.java:107)
	at 
org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext$BusyRunnable.run
(BusyIndicatorRunnableContext.java:74)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java
(Compiled Code))
	at org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext.run
(BusyIndicatorRunnableContext.java:120)
	at org.eclipse.jdt.ui.actions.OrganizeImportsAction.runOnSingle
(OrganizeImportsAction.java:360)
	at org.eclipse.jdt.ui.actions.OrganizeImportsAction.run
(OrganizeImportsAction.java:243)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun
(SelectionDispatchAction.java:193)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run
(SelectionDispatchAction.java:169)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:749)
	at 
org.eclipse.ui.internal.registry.AcceleratorScope$AcceleratorAction.run
(AcceleratorScope.java:289)
	at org.eclipse.ui.internal.registry.AcceleratorScope.processKey
(AcceleratorScope.java:249)
	at org.eclipse.ui.internal.KeyBindingMenu$3.handleEvent
(KeyBindingMenu.java:90)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1321)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:775)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:247)
	at org.eclipse.core.launcher.Main.run(Main.java:703)
	at org.eclipse.core.launcher.Main.main(Main.java:539)
Comment 1 Darin Wright CLA 2002-10-10 10:33:25 EDT
Could not reproduce after restarting the workspace.
Comment 2 Olivier Thomann CLA 2002-10-10 14:53:47 EDT
I will investigate.
Comment 3 Olivier Thomann CLA 2002-10-10 15:06:38 EDT
I added a new check. It seems possible in some cases that the return type is
null. This is the case in code assist.
Fixed and released in 2.1 stream.
Comment 4 Olivier Thomann CLA 2002-10-11 14:56:24 EDT
Change milestone.
Comment 5 David Audel CLA 2002-10-17 10:33:36 EDT
Verified.