Project: JDT
Bug 44514 NPE from JavaModel
Reported: 2003-10-08 22:55:07 | Status: resolved fixed

Build: I-200310081556 I opened a call hierarchy on the method ClasspathUtilCore.addMissingProjectAsDependency(...) Once I double-clicked on the method container.put(..) in the call hierarchy, I got the following NPE: Error Oct 08, 2003 22:46:36.473 Problems occurred when invoking code from plug- in: "org.eclipse.jface". java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.toOriginal (JavaModelUtil.java:601) at org.eclipse.jdt.internal.corext.callhierarchy.CallLocation.getICompilationUnit (CallLocation.java:101) at org.eclipse.jdt.internal.corext.callhierarchy.CallLocation.getCallText (CallLocation.java:108) at org.eclipse.jdt.internal.ui.callhierarchy.LocationLabelProvider.removeWhitespac eOutsideStringLiterals(LocationLabelProvider.java:50) at org.eclipse.jdt.internal.ui.callhierarchy.LocationLabelProvider.getColumnText (LocationLabelProvider.java:104) at org.eclipse.jface.viewers.TableViewer.doUpdateItem (TableViewer.java:196) at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run (StructuredViewer.java:119) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:1018) at org.eclipse.core.runtime.Platform.run(Platform.java:461) at org.eclipse.jface.viewers.StructuredViewer.updateItem (StructuredViewer.java:1263) at org.eclipse.jface.viewers.TableViewer.internalRefresh (TableViewer.java:488) at org.eclipse.jface.viewers.TableViewer.internalRefresh (TableViewer.java:431) at org.eclipse.jface.viewers.StructuredViewer$7.run (StructuredViewer.java:856) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection (StructuredViewer.java:796) at org.eclipse.jface.viewers.StructuredViewer.refresh (StructuredViewer.java:854) at org.eclipse.jface.viewers.StructuredViewer.refresh (StructuredViewer.java:816) at org.eclipse.jface.viewers.TableViewer.inputChanged (TableViewer.java:398) at org.eclipse.jface.viewers.ContentViewer.setInput (ContentViewer.java:238) at org.eclipse.jface.viewers.StructuredViewer.setInput (StructuredViewer.java:983) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewPart.updateLocations View(CallHierarchyViewPart.java:884) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewPart.methodSelection Changed(CallHierarchyViewPart.java:621) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewPart.selectionChange d(CallHierarchyViewPart.java:606) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:159) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:1018) at org.eclipse.core.runtime.Platform.run(Platform.java:461) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:157) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1282) at org.eclipse.jface.viewers.StructuredViewer.handleSelect (StructuredViewer.java:652) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected (StructuredViewer.java:676) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent (OpenStrategy.java:178) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:173) at org.eclipse.jface.util.OpenStrategy$1.handleEvent (OpenStrategy.java:309) 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:2173) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1863) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2334) at org.eclipse.ui.internal.Workbench.run(Workbench.java:2317) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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)

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/callhierarchy/CallLocation.java