Remove Augmentation{Identifier,Node}
[yangtools.git] / data / yang-data-util / src / main / java / org / opendaylight / yangtools / yang / data / util / CompositeNodeDataWithSchema.java
index 37d6d5730c9008c5b5f8a8dcc651f56e0d335f71..683f0463e21edfde57cbd7d2a542a42f4efe35bc 100644 (file)
@@ -17,7 +17,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Deque;
 import java.util.List;
-import java.util.Map.Entry;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter.MetadataExtension;
@@ -257,19 +256,9 @@ public class CompositeNodeDataWithSchema<T extends DataSchemaNode> extends Abstr
         for (AbstractNodeDataWithSchema<?> child : children) {
             child.write(writer, metaWriter);
         }
-        for (Entry<AugmentationSchemaNode, Collection<AbstractNodeDataWithSchema<?>>> augmentationToChild
-                : augmentationsToChild.asMap().entrySet()) {
-            final Collection<AbstractNodeDataWithSchema<?>> childsFromAgumentation = augmentationToChild.getValue();
-            if (!childsFromAgumentation.isEmpty()) {
-                // FIXME: can we get the augmentation schema?
-                writer.startAugmentationNode(DataSchemaContextNode.augmentationIdentifierFrom(
-                    augmentationToChild.getKey()));
-
-                for (AbstractNodeDataWithSchema<?> nodeDataWithSchema : childsFromAgumentation) {
-                    nodeDataWithSchema.write(writer, metaWriter);
-                }
-
-                writer.endNode();
+        for (var childsFromAgumentation : augmentationsToChild.asMap().values()) {
+            for (var nodeDataWithSchema : childsFromAgumentation) {
+                nodeDataWithSchema.write(writer, metaWriter);
             }
         }
     }