Fixed bug when new childs were ommited during data store merge. 05/5105/1
authorTony Tkacik <ttkacik@cisco.com>
Mon, 3 Feb 2014 18:20:36 +0000 (19:20 +0100)
committerTony Tkacik <ttkacik@cisco.com>
Mon, 3 Feb 2014 18:20:36 +0000 (19:20 +0100)
Change-Id: I0680d1354614d7597b0079445951d4a6f33d8d5c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/util/YangDataOperations.xtend

index a9ec2c7..1e89281 100644 (file)
@@ -70,7 +70,7 @@ class YangDataOperations {
         
         if(node.keyDefinition === null || node.keyDefinition.empty) {
             return modified;
-        } 
+        }
         val originalMap = (original as List).toIndexMap(node.keyDefinition);
         val modifiedMap = (modified as List).toIndexMap(node.keyDefinition);
         
@@ -80,7 +80,8 @@ class YangDataOperations {
             if(originalEntry != null) {
                 originalMap.remove(entry.key);
                 mergedNodes.add(merge(node,originalEntry,entry.value,configurational));
-                
+            } else {
+                mergedNodes.add(entry.value);
             }
         }
         mergedNodes.addAll(originalMap.values);