Project: JDT
Bug 19066 NPE in RenameTempRefactoring
Reported: 2002-06-04 10:29:29 | Status: verified fixed

I was doing some experiments with a .java file opened from the repository. However, I cannot reproduce it. The next time I've tried the action wasn't available in the context menu anymore. We should guard against the null pointer exception. java.lang.NullPointerException at org.eclipse.jdt.internal.corext.refactoring.rename.RenameTempRefactoring.<init> (RenameTempRefactoring.java:51) at org.eclipse.jdt.internal.ui.refactoring.actions.RenameTempAction.createRefactori ng(RenameTempAction.java:36) at org.eclipse.jdt.internal.ui.refactoring.actions.RenameTempAction.canRun (RenameTempAction.java:54) at org.eclipse.jdt.ui.actions.RenameAction.run(RenameAction.java:73) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:180) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:156) at org.eclipse.jface.action.Action.runWithEvent(Action.java:749) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1177) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1160) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:244) at org.eclipse.core.launcher.Main.run(Main.java:693) at org.eclipse.core.launcher.Main.main(Main.java:526)

Files changed in fix:
org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/RenameTempAction.java