Update StoreTreeNode methods
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / tree / SchemaAwareApplyOperation.java
index 9531d837ac5b4f5d17897dd0d75572cf031d825c..bc7dd85056dd979aad5c39798ccd550c47ece7a3 100644 (file)
@@ -115,10 +115,10 @@ abstract class SchemaAwareApplyOperation<T extends WithStatus> extends Modificat
                 "Node children was modified by other transaction");
     }
 
-    protected final ModificationApplyOperation resolveChildOperation(final PathArgument child) {
-        final Optional<ModificationApplyOperation> potential = getChild(child);
-        checkArgument(potential.isPresent(), "Operation for child %s is not defined.", child);
-        return potential.get();
+    protected final @NonNull ModificationApplyOperation resolveChildOperation(final PathArgument child) {
+        final ModificationApplyOperation potential = childByArg(child);
+        checkArgument(potential != null, "Operation for child %s is not defined.", child);
+        return potential;
     }
 
     @Override