Remove merge semantics of CommandContext keys 86/1086/4
authorAntti Villberg <antti.villberg@semantum.fi>
Mon, 9 Oct 2017 17:06:15 +0000 (20:06 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 9 Oct 2017 20:30:25 +0000 (23:30 +0300)
refs #7533

Change-Id: I2b1ff40aa64fbb10d215641962866dad634df472

bundles/org.simantics.document.server.io/src/org/simantics/document/server/io/CommandContextImpl.java

index 5fb3a283e93a0b635768e5517fc1b3e6f14ac50d..8ff198cbf9d2712493f52b04793dad59c2d5d6a1 100644 (file)
@@ -67,13 +67,7 @@ public class CommandContextImpl implements CommandContextMutable {
                        Map<String,List<List<Object>>> from = context.getData(); 
                        for (Map.Entry<String, List<List<Object>>> entry : from.entrySet()) {
                                String key = entry.getKey();
-                               Object existing = getValue(key);
-                               Object newValue = context.getValue(key);
-                               // Do not merge duplicates!
-                               if (newValue != null && newValue.equals(existing))
-                                       continue;
-                               List<List<Object>> rows = ensureRowsAvailable(entry.getKey());
-                               rows.addAll(entry.getValue());
+                               putValue(key, context.getValue(key));
                        }
                }
                return this;