Project: Eclipse_Platform_UI
Bug 118094 [Workbench] NPE in EditorManager.saveEditorState
Reported: 2005-11-25 13:30:48 | Status: verified fixed

Build: I20051123 ((IPathEditorInput) input).getPath().toString()); The FileEditorInput implementation of getPath returns IResource.getLocation(), which can return null if the file is not in the local file system. java.lang.NullPointerException at org.eclipse.ui.internal.EditorManager$7.run(EditorManager.java:1308) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:785) at org.eclipse.ui.internal.EditorManager.saveEditorState(EditorManager.java:1267) at org.eclipse.ui.internal.EditorManager.saveState(EditorManager.java:1188) at org.eclipse.ui.internal.WorkbenchPage.saveState(WorkbenchPage.java:2827) at org.eclipse.ui.internal.WorkbenchWindow.saveState(WorkbenchWindow.java:2309) at org.eclipse.ui.internal.Workbench.saveState(Workbench.java:1797) at org.eclipse.ui.internal.Workbench.recordWorkbenchState(Workbench.java:1497) at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:1494) at org.eclipse.ui.internal.Workbench$9.run(Workbench.java:590) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:785) at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:588) at org.eclipse.ui.internal.Workbench.access$8(Workbench.java:553) at org.eclipse.ui.internal.Workbench$12.run(Workbench.java:744) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.Workbench.close(Workbench.java:742) at org.eclipse.ui.internal.Workbench.close(Workbench.java:717) at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:646) at org.eclipse.ui.internal.WorkbenchWindow.access$0(WorkbenchWindow.java:630) at org.eclipse.ui.internal.WorkbenchWindow$2.run(WorkbenchWindow.java:731) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:729) at org.eclipse.jface.window.Window.handleShellCloseEvent(Window.java:726) at org.eclipse.jface.window.Window$3.shellClosed(Window.java:673) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:159) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:905) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:929) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914) at org.eclipse.swt.widgets.Decorations.closeWidget(Decorations.java:257) at org.eclipse.swt.widgets.Decorations.WM_CLOSE(Decorations.java:1605) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3145) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1538) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3919) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1700) at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:433) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3230) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1538) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3919) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1700) at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:433) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3230) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1538) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3919) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1705) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2859)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java