Bug 175181 NavigatorSaveablesServices NPEs on shutdown
The following exception was encountered on shutdown the applicaiton. It happend on Linux(SuSE Linux Enterprise 9, PatchLevel: 3). It's very similar to defect: 142785. !ENTRY org.eclipse.osgi 4 0 2006-05-19 11:21:38.993 !MESSAGE An unexpected runtime error has occurred. !STACK 0 java.lang.NullPointerException at org.eclipse.ui.internal.navigator.NavigatorSaveablesService.computeSaveables(NavigatorSaveablesService.java:216) at org.eclipse.ui.internal.navigator.NavigatorSaveablesService.recomputeSaveablesAndNotify(NavigatorSaveablesService.java:374) at org.eclipse.ui.internal.navigator.NavigatorSaveablesService.handleBundleStopped(NavigatorSaveablesService.java:457) at org.eclipse.ui.internal.navigator.NavigatorSaveablesService.bundleChanged(NavigatorSaveablesService.java:100) at org.eclipse.ui.internal.navigator.NavigatorPlugin$1.bundleChanged(NavigatorPlugin.java:35) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:1206) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:189) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:291) 11
bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorSaveablesService.java
import org.eclipse.jface.viewers.ITreeSelection;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.ISaveablesLifecycleListener;
import org.eclipse.ui.ISaveablesSource;
import org.eclipse.ui.Saveable;
import org.eclipse.ui.SaveablesLifecycleEvent;
import org.eclipse.ui.internal.navigator.VisibilityAssistant.VisibilityListener;
import org.eclipse.ui.internal.navigator.extensions.ExtensionPriorityComparator;
import org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptor;
import org.eclipse.ui.internal.navigator.extensions.NavigatorContentExtension;
import org.eclipse.ui.navigator.INavigatorContentDescriptor;
import org.eclipse.ui.navigator.INavigatorSaveablesService;
import org.eclipse.ui.navigator.SaveablesProvider;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleEvent;
/**
 * Implementation of INavigatorSaveablesService.
 * <p>
 * Implementation note: all externally callable methods are synchronized. The
 * private helper methods are not synchronized since they can only be called
 * from methods that already hold the lock.
 * </p>
 * @since 3.2
 * 
 */
public class NavigatorSaveablesService implements INavigatorSaveablesService, VisibilityListener {