Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2012-03-15 13:34:21 -0400
committerThomas Watson2012-04-03 13:49:48 -0400
commit7b33d2424dedfdc625d623e853bf84784e9a5678 (patch)
treefe12879b2513c14fef58f050074141c8358dca01
parentd7908eb7405c8fe8363bb937152ee9a8e7866040 (diff)
downloadrt.equinox.framework-R3_6_1_patches.tar.gz
rt.equinox.framework-R3_6_1_patches.tar.xz
rt.equinox.framework-R3_6_1_patches.zip
Bug 374300 - Should protect against adding vm shutdown hooks when the VM is in the process of being shutdownR3_6_1_patches
-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 5d197d583..2da9898c1 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
@@ -1284,7 +1284,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