Project: JDT
Bug 95148 [refactoring] Move member type to new file fails on member of enum
Reported: 2005-05-13 12:02:47 | Status: verified fixed

Against I20050513-0010. Code: public enum CopyOfHelperType { SETUP, TEARDOWN; static class AnnotationInvoker { private CopyOfHelperType type; public AnnotationInvoker(CopyOfHelperType type) { this.type = type; } void invoke(Object theInstance) throws IllegalAccessException, Throwable { } } public void invokeTheAnnotation(final Object theInstance) throws Throwable, IllegalAccessException { new AnnotationInvoker(this).invoke(theInstance); } } Move AnnotationInvoker to a new file. Assertion failed error: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:327) at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:624) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:621) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2137) 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.RefactoringWizard.getStartingPage(RefactoringWizard.java:399) at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.createContents(RefactoringWizardDialog2.java:526) at org.eclipse.jface.window.Window.create(Window.java:418) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:996) at org.eclipse.jface.window.Window.open(Window.java:770) 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.startMoveInnerRefactoring(RefactoringExecutionStarter.java:273) at org.eclipse.jdt.ui.actions.ConvertNestedToTopAction.run(ConvertNestedToTopAction.java:154) 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.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:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2921) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2554) at org.eclipse.jdt.internal.ui.actions.QuickMenuAction.run(QuickMenuAction.java:79) at org.eclipse.jface.action.Action.runWithEvent(Action.java:996) at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:182) at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:108) at org.eclipse.core.commands.Command.execute(Command.java:311) at org.eclipse.core.commands.ParameterizedCommand.execute(ParameterizedCommand.java:396) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:452) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:722) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:766) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:543) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:486) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:110) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:781) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:841) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:866) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:851) at org.eclipse.swt.widgets.Control.traverse(Control.java:2779) at org.eclipse.swt.widgets.Control.translateMnemonic(Control.java:2620) at org.eclipse.swt.widgets.Composite.translateMnemonic(Composite.java:827) at org.eclipse.swt.widgets.Control.translateMnemonic(Control.java:2638) at org.eclipse.swt.widgets.Display.translateMnemonic(Display.java:3341) at org.eclipse.swt.widgets.Display.filterMessage(Display.java:795) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2550) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1601) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1565) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:315) 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:230) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:371) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:160) 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.core.launcher.Main.invokeFramework(Main.java:330) at org.eclipse.core.launcher.Main.basicRun(Main.java:274) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument; at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:108) at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:86) at org.eclipse.jdt.internal.corext.refactoring.structure.MoveInnerToTopRefactoring.findTypeDeclaration(MoveInnerToTopRefactoring.java:389) at org.eclipse.jdt.internal.corext.refactoring.structure.MoveInnerToTopRefactoring.checkConstructorParameterNames(MoveInnerToTopRefactoring.java:681) at org.eclipse.jdt.internal.corext.refactoring.structure.MoveInnerToTopRefactoring.checkFinalConditions(MoveInnerToTopRefactoring.java:727) 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:1716) 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/MoveInnerToTopRefactoring.java