BUG-509: there is only one createRecursively() 94/7294/2
authorRobert Varga <rovarga@cisco.com>
Tue, 20 May 2014 14:25:33 +0000 (16:25 +0200)
committerTony Tkacik <ttkacik@cisco.com>
Wed, 21 May 2014 15:21:02 +0000 (15:21 +0000)
The naming and exposure of two and three arugment variants made things
confusing -- let it be clear there is only one version.

Change-Id: If05620e99c2200ee10c1881de8eecd015f18eb9b
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/SchemaAwareApplyOperation.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/StoreMetadataNode.java

index c3c0273..620c007 100644 (file)
@@ -358,7 +358,7 @@ abstract class SchemaAwareApplyOperation implements ModificationApplyOperation {
                 nodeVersion = subtreeVersion;
             }
 
                 nodeVersion = subtreeVersion;
             }
 
-            final StoreMetadataNode newValueMeta = StoreMetadataNode.createRecursively(newValue, nodeVersion, nodeVersion);
+            final StoreMetadataNode newValueMeta = StoreMetadataNode.createRecursively(newValue, nodeVersion);
             if (!modification.hasAdditionalModifications()) {
                 return newValueMeta;
             }
             if (!modification.hasAdditionalModifications()) {
                 return newValueMeta;
             }
index 60d701b..695a1f1 100644 (file)
@@ -84,16 +84,16 @@ class StoreMetadataNode implements Immutable, Identifiable<PathArgument> {
     }
 
     public static final StoreMetadataNode createRecursively(final NormalizedNode<?, ?> node,
     }
 
     public static final StoreMetadataNode createRecursively(final NormalizedNode<?, ?> node,
-            final UnsignedLong nodeVersion, final UnsignedLong subtreeVersion) {
-        Builder builder = builder(nodeVersion) //
-                .setSubtreeVersion(subtreeVersion) //
+            final UnsignedLong version) {
+        Builder builder = builder(version) //
+                .setSubtreeVersion(version) //
                 .setData(node);
         if (node instanceof NormalizedNodeContainer<?, ?, ?>) {
 
             @SuppressWarnings("unchecked")
             NormalizedNodeContainer<?, ?, NormalizedNode<?, ?>> nodeContainer = (NormalizedNodeContainer<?, ?, NormalizedNode<?, ?>>) node;
             for (NormalizedNode<?, ?> subNode : nodeContainer.getValue()) {
                 .setData(node);
         if (node instanceof NormalizedNodeContainer<?, ?, ?>) {
 
             @SuppressWarnings("unchecked")
             NormalizedNodeContainer<?, ?, NormalizedNode<?, ?>> nodeContainer = (NormalizedNodeContainer<?, ?, NormalizedNode<?, ?>>) node;
             for (NormalizedNode<?, ?> subNode : nodeContainer.getValue()) {
-                builder.add(createRecursively(subNode, nodeVersion, subtreeVersion));
+                builder.add(createRecursively(subNode, version));
             }
         }
         return builder.build();
             }
         }
         return builder.build();
@@ -154,7 +154,4 @@ class StoreMetadataNode implements Immutable, Identifiable<PathArgument> {
         }
     }
 
         }
     }
 
-    public static StoreMetadataNode createRecursively(final NormalizedNode<?, ?> node, final UnsignedLong version) {
-        return createRecursively(node, version, version);
-    }
 }
 }