Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2012-11-09 12:02:17 -0500
committerThomas Watson2012-11-09 12:02:17 -0500
commitc2fecc2cda3c512192cc1a3715bb18fb92fb1dc5 (patch)
treecc2e5b896fd533a1f4f6f9e4d03c25484cbe8dc4
parenta206df89cf33e151bd69de5c769b8f7c4a54426f (diff)
downloadrt.equinox.framework-c2fecc2cda3c512192cc1a3715bb18fb92fb1dc5.tar.gz
rt.equinox.framework-c2fecc2cda3c512192cc1a3715bb18fb92fb1dc5.tar.xz
rt.equinox.framework-c2fecc2cda3c512192cc1a3715bb18fb92fb1dc5.zip
Bug 393612 - Package Explorer view fails with unhandled InterruptedException from ClasspathManagerv20121109-170217I20121113-0800
-rw-r--r--bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/loader/ClasspathManager.java22
1 files changed, 14 insertions, 8 deletions
diff --git a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/loader/ClasspathManager.java b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/loader/ClasspathManager.java
index bba55ad7b..da72e01a9 100644
--- a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/loader/ClasspathManager.java
+++ b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/loader/ClasspathManager.java
@@ -512,17 +512,23 @@ public class ClasspathManager {
Thread current = Thread.currentThread();
if (lockingThread == current)
return false;
- while (true) {
- if (lockingThread == null) {
- classNameLocks.put(classname, current);
- return true;
- }
- try {
+ boolean previousInterruption = Thread.interrupted();
+ try {
+ while (true) {
+ if (lockingThread == null) {
+ classNameLocks.put(classname, current);
+ return true;
+ }
+
classNameLocks.wait();
lockingThread = classNameLocks.get(classname);
- } catch (InterruptedException e) {
+ }
+ } catch (InterruptedException e) {
+ current.interrupt();
+ throw (LinkageError) new LinkageError(classname).initCause(e);
+ } finally {
+ if (previousInterruption) {
current.interrupt();
- throw (LinkageError) new LinkageError(classname).initCause(e);
}
}
}

Back to the top