Project: JDT
Bug 8221 NPE in refactoring preview page (Pull up)
Reported: 2002-01-23 13:34:55 | Status: verified fixed

1. select TestCase.setUp and invoke 'Pull Up' 2. In the delete tree check all elements, press next 3. Open the 'VectorTest.java' tree and select the node 'Delete....' -> 4 org.eclipse.core.runtime 0 java.lang.NullPointerException java.lang.NullPointerException at org.eclipse.jdt.internal.ui.refactoring.ComparePreviewer$CompareInput.<init> (ComparePreviewer.java:42) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.getCompareInput (PreviewWizardPage.java:211) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.getPreviewer (PreviewWizardPage.java:254) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.showPreview (PreviewWizardPage.java:374) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.access$1 (PreviewWizardPage.java:372) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage$2.selectionChanged (PreviewWizardPage.java:363) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java (Compiled Code)) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:999) at org.eclipse.jface.viewers.StructuredViewer.handleSelect (StructuredViewer.java:466) at org.eclipse.jface.viewers.CheckboxTreeViewer.handleSelect (CheckboxTreeViewer.java:233) at org.eclipse.jface.viewers.AbstractTreeViewer$1.widgetSelected (AbstractTreeViewer.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.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.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:83) at org.eclipse.jdt.internal.ui.refactoring.actions.OpenRefactoringWizardAction.run (OpenRefactoringWizardAction.java:65) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.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:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.UIMain.main(UIMain.java:52)

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/ImportEdit.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/textmanipulation/SimpleTextEdit.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/textmanipulation/TextEdit.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/textmanipulation/TextRange.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/DeleteSourceReferenceEdit.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/MoveCuUpdateCreator.java org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ChangeElementContentProvider.java org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ComparePreviewer.java org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PreviewWizardPage.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/PasteInCompilationUnitEdit.java