Project: JDT
Bug 134742 [pull up] Internal error while "Pull up" method
Reported: 2006-04-04 09:26:24 | Status: resolved fixed

I was trying to "Pull up" a method (which has a compilation error caused by an @Override annotation with no corresponding method in its superclass), via the Refactoring menu, and got the following error: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:327) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:830) at org.eclipse.ltk.ui.refactoring.RefactoringWizard.createChange(RefactoringWizard.java:573) at org.eclipse.ltk.ui.refactoring.RefactoringWizard.computeUserInputSuccessorPage(RefactoringWizard.java:416) at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.computeSuccessorPage(UserInputWizardPage.java:74) at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.getNextPage(UserInputWizardPage.java:114) at org.eclipse.jdt.internal.ui.refactoring.PullUpWizard$PullUpInputPage2.getNextPage(PullUpWizard.java:1150) at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:747) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:345) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:556) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758) at org.eclipse.jface.window.Window.runEventLoop(Window.java:809) at org.eclipse.jface.window.Window.open(Window.java:787) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:125) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:138) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:40) at org.eclipse.jdt.internal.corext.refactoring.RefactoringExecutionStarter.startPullUpRefactoring(RefactoringExecutionStarter.java:305) at org.eclipse.jdt.ui.actions.PullUpAction.run(PullUpAction.java:142) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:226) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:198) at org.eclipse.jface.action.Action.runWithEvent(Action.java:996) at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:222) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:228) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163) 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.invokeFramework(Main.java:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: assertion failed; at org.eclipse.jdt.internal.corext.Assert.isTrue(Assert.java:139) at org.eclipse.jdt.internal.corext.Assert.isTrue(Assert.java:124) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.checkMethodReturnTypes(PullUpRefactoring.java:804) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.checkMembersInTypeAndAllSubtypes(PullUpRefactoring.java:790) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.checkFinalConditions(PullUpRefactoring.java:604) at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:84) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:114) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1721) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:86) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) Root exception: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: assertion failed; at org.eclipse.jdt.internal.corext.Assert.isTrue(Assert.java:139) at org.eclipse.jdt.internal.corext.Assert.isTrue(Assert.java:124) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.checkMethodReturnTypes(PullUpRefactoring.java:804) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.checkMembersInTypeAndAllSubtypes(PullUpRefactoring.java:790) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.checkFinalConditions(PullUpRefactoring.java:604) at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:84) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:114) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1721) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:86) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)

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