Project: JDT
Bug 99110 NPE when opening quick refactor menu shortly after editing
Reported: 2005-06-09 04:46:38 | Status: verified fixed

N20050609-0010 I cannot reproduce reliably, but this exception sometimes happens when I open the quick refactor menu by pressing Alt+Shift+T shortly after having edited and saved a CU. When I press Alt+Shift+T again, the menu opens without problems. java.lang.NullPointerException at org.eclipse.jdt.internal.corext.refactoring.RefactoringAvailabilityTester.isExtractTempAvailable(RefactoringAvailabilityTester.java:323) at org.eclipse.jdt.ui.actions.ExtractTempAction.selectionChanged(ExtractTempAction.java:70) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged(SelectionDispatchAction.java:212) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update(SelectionDispatchAction.java:114) at org.eclipse.jdt.ui.actions.RefactorActionGroup.fillQuickMenu(RefactorActionGroup.java:596) at org.eclipse.jdt.ui.actions.RefactorActionGroup.access$0(RefactorActionGroup.java:584) at org.eclipse.jdt.ui.actions.RefactorActionGroup$RefactorQuickAccessAction.fillMenu(RefactorActionGroup.java:144) at org.eclipse.jdt.internal.ui.actions.QuickMenuAction.run(QuickMenuAction.java:71) 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:459) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:781) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:828) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:550) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:493) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:117) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:910) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:868) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:853) at org.eclipse.swt.widgets.Control.traverse(Control.java:2778) at org.eclipse.swt.widgets.Control.translateMnemonic(Control.java:2619) at org.eclipse.swt.widgets.Composite.translateMnemonic(Composite.java:827) at org.eclipse.swt.widgets.Control.translateMnemonic(Control.java:2637) at org.eclipse.swt.widgets.Display.translateMnemonic(Display.java:3487) at org.eclipse.swt.widgets.Display.filterMessage(Display.java:924) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2684) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1717) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1681) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:366) 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(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: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)

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