Bug 4295: Fixed incorrectly introduced nodes when MERGE was followed by DELETE
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / tree / ModifiedNode.java
index cae3e94d1c7bdd7aa2dc5a5550cb2e2b0d8166dd..be0ed682adf111f79b9148bdfdb4953fc5045dcc 100644 (file)
@@ -221,6 +221,11 @@ final class ModifiedNode extends NodeModification implements StoreTreeNode<Modif
             newType = LogicalOperation.DELETE;
             break;
         case MERGE:
+                // In case of merge - delete needs to be recored and must not to be changed into
+                // NONE, because lazy expansion of parent MERGE node would reintroduce it
+                // again.
+                newType = LogicalOperation.DELETE;
+                break;
         case TOUCH:
         case WRITE:
             /*