Disconnect NormalizedNode from Identifiable
[yangtools.git] / data / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / builder / impl / ImmutableMapNodeBuilder.java
index 939efe0dfee273345114868902f5a034cf15d258..8d0544bb42f0e91b4593a88fc023242adac681b6 100644 (file)
@@ -45,7 +45,7 @@ public class ImmutableMapNodeBuilder implements CollectionNodeBuilder<MapEntryNo
     }
 
     protected ImmutableMapNodeBuilder(final SystemMapNode node) {
-        nodeIdentifier = node.getIdentifier();
+        nodeIdentifier = node.name();
         value = MapAdaptor.getDefaultInstance().takeSnapshot(accessChildren(node));
     }
 
@@ -63,7 +63,7 @@ public class ImmutableMapNodeBuilder implements CollectionNodeBuilder<MapEntryNo
 
     @Override
     public ImmutableMapNodeBuilder withChild(final MapEntryNode child) {
-        value.put(child.getIdentifier(), child);
+        value.put(child.name(), child);
         return this;
     }
 
@@ -76,7 +76,7 @@ public class ImmutableMapNodeBuilder implements CollectionNodeBuilder<MapEntryNo
     @Override
     public ImmutableMapNodeBuilder withValue(final Collection<MapEntryNode> withValue) {
         // TODO replace or putAll ?
-        for (final MapEntryNode mapEntryNode : withValue) {
+        for (var mapEntryNode : withValue) {
             withChild(mapEntryNode);
         }