aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ross2013-11-12 15:12:28 (EST)
committerJohn Ross2013-11-13 14:23:30 (EST)
commit8402ed44617f584caa868d297a6466ba98750891 (patch)
tree4ff2729bef731fa39fbef4e5c2167f75252ac64c
parent1354da95ef22b6ecd9170a3c953776575807e78e (diff)
downloadrt.equinox.bundles-8402ed44617f584caa868d297a6466ba98750891.zip
rt.equinox.bundles-8402ed44617f584caa868d297a6466ba98750891.tar.gz
rt.equinox.bundles-8402ed44617f584caa868d297a6466ba98750891.tar.bz2
Bug 421487 - Check for null when unwinding the thread local coordination stack.
-rw-r--r--bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationImpl.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationImpl.java b/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationImpl.java
index a597aac..6b1e58e 100644
--- a/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationImpl.java
+++ b/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others.
+ * Copyright (c) 2010, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -136,8 +136,8 @@ public class CoordinationImpl {
throw new CoordinationException(Messages.EndingThreadNotSame, referent, CoordinationException.WRONG_THREAD);
}
// Unwind the stack in case there are other coordinations higher
- // up than this one.
- while (!coordinator.peek().equals(referent)) {
+ // up than this one. See bug 421487 for why peek() may be null.
+ while (!(coordinator.peek() == null || coordinator.peek().equals(referent))) {
try {
coordinator.peek().end();
} catch (CoordinationException e) {