BUG-4295: fix merge callsite
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / tree / UnkeyedListModificationStrategy.java
index 4b569cef0ee9b9b48d0145a23036b16d485a604f..561f5fcc7876ee17cc98138a8cfab40895561c5a 100644 (file)
@@ -38,8 +38,8 @@ final class UnkeyedListModificationStrategy extends SchemaAwareApplyOperation {
 
     @Override
     protected TreeNode applyMerge(final ModifiedNode modification, final TreeNode currentMeta, final Version version) {
-        // A merge operation is promoted into a write
-        return applyWrite(modification, Optional.of(currentMeta), version);
+        throw new IllegalStateException(String.format("Merge of modification %s on unkeyed list should never be called",
+            modification));
     }
 
     @Override