summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaspar De Groot2011-04-20 01:58:23 (EDT)
committerCaspar De Groot2011-04-20 01:58:23 (EDT)
commit18ad18d6b3bf0f089f8c3ff9f8367652f1cdb1ea (patch)
tree5f9965ca696bcec4eb5b7cfb18dbd3fd4cdf672f
parent26b1130a7ddb6c42076ba8e09a5be8cf8ed5d92d (diff)
downloadcdo-18ad18d6b3bf0f089f8c3ff9f8367652f1cdb1ea.zip
cdo-18ad18d6b3bf0f089f8c3ff9f8367652f1cdb1ea.tar.gz
cdo-18ad18d6b3bf0f089f8c3ff9f8367652f1cdb1ea.tar.bz2
[Bug 343254] CDOTxImpl.removeCrossRefs can throw ConcurrentModEx
https://bugs.eclipse.org/bugs/show_bug.cgi?id=343254
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
index e32020b..668e8b2 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
@@ -2099,9 +2099,9 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
private void removeCrossReferences(Collection<CDOObject> referencers, Set<CDOID> referencedOIDs)
{
+ List<Pair<Setting, EObject>> objectsToBeRemoved = new LinkedList<Pair<Setting, EObject>>();
for (CDOObject referencer : referencers)
{
- List<Pair<Setting, EObject>> objectsToBeRemoved = new LinkedList<Pair<Setting, EObject>>();
EContentsEList.FeatureIterator<EObject> it = (EContentsEList.FeatureIterator<EObject>)referencer
.eCrossReferences().iterator();
while (it.hasNext())
@@ -2143,11 +2143,11 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
objectsToBeRemoved.add(new Pair<Setting, EObject>(setting, referencedObject));
}
}
+ }
- for (Pair<Setting, EObject> pair : objectsToBeRemoved)
- {
- EcoreUtil.remove(pair.getElement1(), pair.getElement2());
- }
+ for (Pair<Setting, EObject> pair : objectsToBeRemoved)
+ {
+ EcoreUtil.remove(pair.getElement1(), pair.getElement2());
}
}