Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java
index b165bfe85..cd6845667 100644
--- a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java
+++ b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java
@@ -1361,7 +1361,11 @@ public class BaseStorage implements SynchronousBundleListener {
});
runningThread = new Thread(this, "State Saver"); //$NON-NLS-1$
runningThread.start();
- Runtime.getRuntime().addShutdownHook(shutdownHook);
+ try {
+ Runtime.getRuntime().addShutdownHook(shutdownHook);
+ } catch (IllegalStateException e) {
+ // bug 374300 - need to ignore this in case the VM is being shutdown
+ }
}
}
}

Back to the top