Fix child ordering assumptions
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / tree / OperationWithModification.java
index 3293a05b066edea7cc77a9e51796794063fd4c4c..6d20d385ee194b908f6aa015679324fb5cbd3e39 100644 (file)
@@ -80,15 +80,7 @@ final class OperationWithModification {
 
     private OperationWithModification forChild(final PathArgument childId) {
         ModificationApplyOperation childOp = applyOperation.getChild(childId).get();
-
-        final boolean isOrdered;
-        if (childOp instanceof SchemaAwareApplyOperation) {
-            isOrdered = ((SchemaAwareApplyOperation) childOp).isOrdered();
-        } else {
-            isOrdered = true;
-        }
-
-        ModifiedNode childMod = modification.modifyChild(childId, isOrdered);
+        ModifiedNode childMod = modification.modifyChild(childId, childOp.getChildPolicy());
 
         return from(childOp,childMod);
     }