Bug 64134 NPE in JavaRuntime on Workbench Exit.
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
index 6fdca0a..c6f555e 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
@@ -387,11 +387,15 @@
}
private void initializeBundleStopperTracker() {
- stopperTracker = new ServiceTracker(context, BundleStopper.class.getName(), null);
- stopperTracker.open();
+ if (! "false".equalsIgnoreCase(System.getProperties().getProperty("eclipse.strictShutdown"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ stopperTracker = new ServiceTracker(context, BundleStopper.class.getName(), null);
+ stopperTracker.open();
+ }
}
public BundleStopper getBundleStopper() {
+ if (stopperTracker == null)
+ return null;
return (BundleStopper) stopperTracker.getService();
}