Project: JDT
Bug 204453 [pull up] NPE in PullUp Refactoring when selecting 'Add Required'
Reported: 2007-09-24 10:13:01 | Status: verified fixed

I20070921-0919 1. Check out org.eclipse.jdt.internal.ui.jarpackager.JarPackageWizardPage revision 1.77 2. Select createDestinationGroup 3. Refactor>Pull Up... 4. Add Required Is: java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.findMethod(JavaModelUtil.java:419) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoringProcessor.isAvailableInDestination(PullUpRefactoringProcessor.java:1751) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoringProcessor.addAllRequiredPullableMembers(PullUpRefactoringProcessor.java:432) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoringProcessor.getAdditionalRequiredMembersToPullUp(PullUpRefactoringProcessor.java:1388) at org.eclipse.jdt.internal.ui.refactoring.PullUpMemberPage$1.run(PullUpMemberPage.java:378) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313) at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:758) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:755) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2451) at org.eclipse.jdt.internal.ui.refactoring.PullUpMemberPage.checkAdditionalRequired(PullUpMemberPage.java:374) at org.eclipse.jdt.internal.ui.refactoring.PullUpMemberPage.access$6(PullUpMemberPage.java:372) at org.eclipse.jdt.internal.ui.refactoring.PullUpMemberPage$5.widgetSelected(PullUpMemberPage.java:468) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3353) 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:142) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:154) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:49) at org.eclipse.jdt.internal.corext.refactoring.RefactoringExecutionStarter.startPullUpRefactoring(RefactoringExecutionStarter.java:418) at org.eclipse.jdt.ui.actions.PullUpAction.run(PullUpAction.java:139) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:272) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:244) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:543) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:489) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:401) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3353) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) 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:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:515) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:455) at org.eclipse.equinox.launcher.Main.run(Main.java:1193) at org.eclipse.equinox.launcher.Main.main(Main.java:1169) at org.eclipse.core.launcher.Main.main(Main.java:30)

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PullUpRefactoringProcessor.java org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpMemberPage.java