aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ross2012-02-19 11:16:56 (EST)
committerJohn Ross2012-02-19 11:16:56 (EST)
commitbfa09835111c8cad6ba9e3f0253329754dcb02d1 (patch)
tree6a78817a353f4248786170cf44a0731d8ed63481
parenta412d9bf7bd8873b9215aa8c2353367920d6582f (diff)
downloadrt.equinox.bundles-bfa09835111c8cad6ba9e3f0253329754dcb02d1.zip
rt.equinox.bundles-bfa09835111c8cad6ba9e3f0253329754dcb02d1.tar.gz
rt.equinox.bundles-bfa09835111c8cad6ba9e3f0253329754dcb02d1.tar.bz2
Bug 371980: Participants are now notified in reverse participation order when ending or failing a coordination.v20120219-1616
-rw-r--r--bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationImpl.java8
1 files changed, 6 insertions, 2 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 ac39a6c..a597aac 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
@@ -156,7 +156,9 @@ public class CoordinationImpl {
Exception exception = null;
// No additional synchronization is needed here because the participant
// list will not be modified post termination.
- for (Participant participant : participants) {
+ List<Participant> participantsToNotify = new ArrayList<Participant>(this.participants);
+ Collections.reverse(participantsToNotify);
+ for (Participant participant : participantsToNotify) {
try {
participant.ended(referent);
} catch (Exception e) {
@@ -261,7 +263,9 @@ public class CoordinationImpl {
// Notify participants this coordination has failed.
// No additional synchronization is needed here because the participant
// list will not be modified post termination.
- for (Participant participant : participants) {
+ List<Participant> participantsToNotify = new ArrayList<Participant>(this.participants);
+ Collections.reverse(participantsToNotify);
+ for (Participant participant : participantsToNotify) {
try {
participant.failed(referent);
} catch (Exception e) {