Bug 52582 [RCP] NPE upon shutdown
Build: I-20040219 Got this NPE upon shutdown. Error Feb 19, 2004 22:29:48.275 Error while stopping plug- in "reference:file:d:/Eclipse/eclipse/plugins/org.eclipse.jdt.ui_3.0.0 [34]". org.osgi.framework.BundleException: Exception in org.eclipse.core.internal.compatibility.PluginActivator.stop() at org.eclipse.osgi.framework.internal.core.BundleContext.stop (BundleContext.java:1155) at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker (BundleHost.java:481) at org.eclipse.osgi.framework.internal.core.Bundle.stop(Bundle.java:477) at org.eclipse.core.internal.plugins.PluginStopper.run(PluginStopper.java:101) at org.eclipse.core.internal.runtime.PlatformActivator.stopLegacyBundles (PlatformActivator.java:286) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:268) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:106) 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.basicRun(Main.java:279) at org.eclipse.core.launcher.Main.run(Main.java:742) at org.eclipse.core.launcher.Main.main(Main.java:581) Nested exception: java.lang.NullPointerException at org.eclipse.jface.dialogs.DialogSettings.save(DialogSettings.java:377) at org.eclipse.jface.dialogs.DialogSettings.save(DialogSettings.java:326) at org.eclipse.jface.dialogs.DialogSettings.save(DialogSettings.java:351) at org.eclipse.ui.plugin.AbstractUIPlugin.saveDialogSettings (AbstractUIPlugin.java:795) at org.eclipse.ui.plugin.AbstractUIPlugin.shutdown(AbstractUIPlugin.java:834) at org.eclipse.jdt.internal.ui.JavaPlugin.shutdown(JavaPlugin.java:290) at org.eclipse.core.internal.compatibility.PluginActivator.stop (PluginActivator.java:66) at org.eclipse.osgi.framework.internal.core.BundleContext$2.run (BundleContext.java:1139) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContext.stop (BundleContext.java:1114) at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker (BundleHost.java:481) at org.eclipse.osgi.framework.internal.core.Bundle.stop(Bundle.java:477) at org.eclipse.core.internal.plugins.PluginStopper.run(PluginStopper.java:101) at org.eclipse.core.internal.runtime.PlatformActivator.stopLegacyBundles (PlatformActivator.java:286) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:268) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:106) 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.basicRun(Main.java:279) at org.eclipse.core.launcher.Main.run(Main.java:742) at org.eclipse.core.launcher.Main.main(Main.java:581)
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
Source source = new DOMSource(document);
        Transformer transformer = TransformerFactory.newInstance().newTransformer();
        transformer.setOutputProperty(OutputKeys.METHOD, "xml");             
        transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); 
        transformer.transform(source, result);            
    }
    catch (TransformerConfigurationException e) {
        throw (IOException) (new IOException().initCause(e));
    }
    catch (TransformerException e) {
        throw (IOException) (new IOException().initCause(e));
    }        
    catch (ParserConfigurationException e) {
        throw (IOException) (new IOException().initCause(e));
    }
}
/* (non-Javadoc)
 * Method declared on IDialogSettings.
 */
public void save(String fileName) throws IOException {
	FileOutputStream stream = new FileOutputStream(fileName);
	OutputStreamWriter writer = new OutputStreamWriter(stream, "utf-8");
	save(writer);
	writer.close();
}
/* (non-Javadoc)
 * Save the settings in the <code>document</code>.
 */
private void save(Document document,Node parent) {
	Element root = document.createElement(TAG_SECTION);