Bug 46769 - NPE in PatternLocator.qualifiedSourceName
Summary: NPE in PatternLocator.qualifiedSourceName
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-17 08:53 EST by Nikolay Metchev CLA
Modified: 2003-11-24 09:41 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 Nikolay Metchev CLA 2003-11-17 08:53:58 EST
I200311050952

I tried to search for references of a particular method and this is what 
happened: 


java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:283)
	at org.eclipse.jface.window.ApplicationWindow$1.run
(ApplicationWindow.java:444)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84)
	at org.eclipse.jface.window.ApplicationWindow.run
(ApplicationWindow.java:441)
	at org.eclipse.ui.internal.WorkbenchWindow.run
(WorkbenchWindow.java:1464)
	at 
org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyContentProvider.getChildr
en(CallHierarchyContentProvider.java:72)
	at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren
(AbstractTreeViewer.java:729)
	at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren
(StructuredViewer.java:463)
	at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren
(StructuredViewer.java:567)
	at org.eclipse.jface.viewers.AbstractTreeViewer$1.run
(AbstractTreeViewer.java:361)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren
(AbstractTreeViewer.java:349)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel
(AbstractTreeViewer.java:926)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel
(AbstractTreeViewer.java:935)
	at org.eclipse.jface.viewers.AbstractTreeViewer$5.run
(AbstractTreeViewer.java:809)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection
(StructuredViewer.java:810)
	at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged
(AbstractTreeViewer.java:798)
	at org.eclipse.jface.viewers.ContentViewer.setInput
(ContentViewer.java:238)
	at org.eclipse.jface.viewers.StructuredViewer.setInput
(StructuredViewer.java:1004)
	at 
org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewer.setMethodWrapper
(CallHierarchyViewer.java:70)
	at 
org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewPart.updateView
(CallHierarchyViewPart.java:914)
	at 
org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewPart.refresh
(CallHierarchyViewPart.java:577)
	at 
org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewPart.setMethod
(CallHierarchyViewPart.java:199)
	at 
org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyUI.openInViewPart
(CallHierarchyUI.java:212)
	at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyUI.open
(CallHierarchyUI.java:199)
	at org.eclipse.jdt.internal.ui.callhierarchy.OpenCallHierarchyAction.run
(OpenCallHierarchyAction.java:187)
	at org.eclipse.jdt.internal.ui.callhierarchy.OpenCallHierarchyAction.run
(OpenCallHierarchyAction.java:126)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun
(SelectionDispatchAction.java:196)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run
(SelectionDispatchAction.java:172)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:542)
	at org.eclipse.jface.action.ActionContributionItem.access$4
(ActionContributionItem.java:494)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent
(ActionContributionItem.java:466)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:847)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2187)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1877)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1611)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1594)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:858)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:299)
	at org.eclipse.core.launcher.Main.run(Main.java:765)
	at org.eclipse.core.launcher.Main.main(Main.java:599)
Caused by: java.lang.NullPointerException
	at 
org.eclipse.jdt.internal.core.search.matching.PatternLocator.qualifiedSourceName
(PatternLocator.java:84)
	at 
org.eclipse.jdt.internal.core.search.matching.PatternLocator.qualifiedSourceName
(PatternLocator.java:82)
	at 
org.eclipse.jdt.internal.core.search.matching.PatternLocator.resolveLevelForType
(PatternLocator.java:277)
	at 
org.eclipse.jdt.internal.core.search.matching.MethodLocator.resolveLevelAsSubtyp
e(MethodLocator.java:260)
	at 
org.eclipse.jdt.internal.core.search.matching.MethodLocator.resolveLevel
(MethodLocator.java:217)
	at 
org.eclipse.jdt.internal.core.search.matching.ClassFileMatchLocator.locateMatche
s(ClassFileMatchLocator.java:79)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.process
(MatchLocator.java:860)
	at 
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches
(MatchLocator.java:607)
	at 
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches
(MatchLocator.java:644)
	at 
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches
(MatchLocator.java:731)
	at org.eclipse.jdt.core.search.SearchEngine.search
(SearchEngine.java:597)
	at org.eclipse.jdt.core.search.SearchEngine.search
(SearchEngine.java:524)
	at 
org.eclipse.jdt.internal.corext.callhierarchy.CallerMethodWrapper.findChildren
(CallerMethodWrapper.java:67)
	at 
org.eclipse.jdt.internal.corext.callhierarchy.MethodWrapper.performSearch
(MethodWrapper.java:282)
	at 
org.eclipse.jdt.internal.corext.callhierarchy.MethodWrapper.doFindChildren
(MethodWrapper.java:220)
	at org.eclipse.jdt.internal.corext.callhierarchy.MethodWrapper.getCalls
(MethodWrapper.java:80)
	at 
org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyContentProvider$MethodWra
pperRunnable.run(CallHierarchyContentProvider.java:40)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:101)
Comment 1 Olivier Thomann CLA 2003-11-17 13:08:20 EST
Any steps to reproduce?
Comment 2 Nikolay Metchev CLA 2003-11-17 14:00:05 EST
not really..it is only happening on this on particular method which was a 
public method. It occurs when I press (CTRL+SHIFT+G) and when i choose display 
call hierarchy!
Comment 3 Kent Johnson CLA 2003-11-18 13:32:32 EST
Can you please paste in the source for the method/class?
Comment 4 Nikolay Metchev CLA 2003-11-19 04:32:53 EST
I have bad news I am afraid. I have forgotten which method it is. Although I do 
remember that I had compilation errors somewhere in my workspace not 
necessarily on the file/method I was searching for. Sorry! If I manage to 
reproduce I will make better notes!
Comment 5 Kent Johnson CLA 2003-11-20 12:57:31 EST
Added protection if the enclosing type of a local type is null.
Comment 6 David Audel CLA 2003-11-24 09:41:40 EST
Verified.