BUG-4295: instantiate MERGE operations lazily
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / tree / UnkeyedListItemModificationStrategy.java
index 6439ed67cb20ab7078e40587523837a1363a1cd5..1e270900582951b8c8f4cc1dc7b46ce87f73d974 100644 (file)
@@ -27,4 +27,11 @@ final class UnkeyedListItemModificationStrategy extends AbstractDataNodeContaine
         checkArgument(original instanceof UnkeyedListEntryNode);
         return ImmutableUnkeyedListEntryNodeBuilder.create((UnkeyedListEntryNode) original);
     }
+
+    @Override
+    protected NormalizedNode<?, ?> createEmptyValue(NormalizedNode<?, ?> original) {
+        checkArgument(original instanceof UnkeyedListEntryNode);
+        return ImmutableUnkeyedListEntryNodeBuilder.create()
+                .withNodeIdentifier(((UnkeyedListEntryNode) original).getIdentifier()).build();
+    }
 }
\ No newline at end of file