Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDONotificationBuilder.java')
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDONotificationBuilder.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDONotificationBuilder.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDONotificationBuilder.java
index 01d4668c1b..aee63c95be 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDONotificationBuilder.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDONotificationBuilder.java
@@ -32,6 +32,7 @@ import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.InternalEObject;
+import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;
import java.util.Set;
@@ -182,6 +183,9 @@ public class CDONotificationBuilder extends CDOFeatureDeltaVisitorImpl
List<Object> list = (List<Object>)oldValue;
if (!list.isEmpty())
{
+ list = new ArrayList<Object>(list); // Copy the list so that it.set() does not change the frozen oldRevision
+ boolean changed = false;
+
for (ListIterator<Object> it = list.listIterator(); it.hasNext();)
{
Object element = it.next();
@@ -192,9 +196,15 @@ public class CDONotificationBuilder extends CDOFeatureDeltaVisitorImpl
if (oldObject != null)
{
it.set(oldObject);
+ changed = true;
}
}
}
+
+ if (changed)
+ {
+ oldValue = list;
+ }
}
}

Back to the top