Project: JDT
Bug 288847 [type hierarchy] NPE from type hierarchy view when refactoring a method
Reported: 2009-09-08 13:40:31 | Status: resolved fixed

I20090901-0800 I added an argument to a method using the refactoring wizard and received this error. java.lang.NullPointerException at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyContentProvider.isCompatibleMethod(TypeHierarchyContentProvider.java:118) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyContentProvider.hasCompatibleMethod(TypeHierarchyContentProvider.java:107) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyContentProvider.hasMemberFilterChildren(TypeHierarchyContentProvider.java:301) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyContentProvider.isInTree(TypeHierarchyContentProvider.java:287) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyContentProvider.hasTypeChildren(TypeHierarchyContentProvider.java:315) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyContentProvider.isInTree(TypeHierarchyContentProvider.java:287) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyContentProvider.hasTypeChildren(TypeHierarchyContentProvider.java:315) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyContentProvider.hasChildren(TypeHierarchyContentProvider.java:251) at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:2083) at org.eclipse.jface.viewers.TreeViewer.isExpandable(TreeViewer.java:587) at org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer.isExpandable(ProblemTreeViewer.java:246) at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:2109) at org.eclipse.jface.viewers.AbstractTreeViewer.updatePlus(AbstractTreeViewer.java:2791) at org.eclipse.jface.viewers.TreeViewer.updatePlus(TreeViewer.java:847) at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeViewer.java:2684) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1863) at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:716) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1870) at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:716) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1838) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1794) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1780) at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1457) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1392) at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:402) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1353) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1455) at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:537) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1414) at org.eclipse.jdt.internal.ui.typehierarchy.TraditionalHierarchyViewer.updateContent(TraditionalHierarchyViewer.java:40) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart$12.run(TypeHierarchyViewPart.java:1135) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart.updateHierarchyViewer(TypeHierarchyViewPart.java:1138) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart.methodSelectionChanged(TypeHierarchyViewPart.java:1199) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart.doSelectionChanged(TypeHierarchyViewPart.java:1180) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart$4.selectionChanged(TypeHierarchyViewPart.java:339) at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:864) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:862) at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1670) at org.eclipse.jface.viewers.TableViewer.setSelection(TableViewer.java:158) at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:392) at org.eclipse.jdt.internal.ui.typehierarchy.MethodsViewer.handleInvalidSelection(MethodsViewer.java:287) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1405) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1353) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1455) at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:537) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1414) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart.doTypeHierarchyChangedOnViewers(TypeHierarchyViewPart.java:1479) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart$16.run(TypeHierarchyViewPart.java:1449) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3860) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3481) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388) at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.run(RefactoringWizardDialog2.java:330) at org.eclipse.ltk.ui.refactoring.RefactoringWizard.internalPerformFinish(RefactoringWizard.java:557) at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.performFinish(UserInputWizardPage.java:153) at org.eclipse.ltk.ui.refactoring.RefactoringWizard.performFinish(RefactoringWizard.java:630) at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.okPressed(RefactoringWizardDialog2.java:453) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3885) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3478) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:143) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:155) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:38) at org.eclipse.jdt.internal.corext.refactoring.RefactoringExecutionStarter.startChangeSignatureRefactoring(RefactoringExecutionStarter.java:213) at org.eclipse.jdt.ui.actions.ModifyParametersAction.run(ModifyParametersAction.java:127) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3885) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3478) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:367) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:610) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:565) at org.eclipse.equinox.launcher.Main.run(Main.java:1362) at org.eclipse.equinox.launcher.Main.main(Main.java:1338)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyContentProvider.java