Do not use SchemaNode.getPath() in assertions
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / tree / ValueNodeModificationStrategy.java
index a204d6eb464ac764dbb9eaa2714e8bebc5b06e80..71beed37dae2a1d253073c86ebe1a2f588879718 100644 (file)
@@ -38,8 +38,7 @@ final class ValueNodeModificationStrategy<T extends DataSchemaNode> extends Sche
 
     @Override
     public Optional<ModificationApplyOperation> getChild(final PathArgument child) {
-        throw new UnsupportedOperationException("Node " + schema.getPath()
-                + " is leaf type node. Child nodes not allowed");
+        throw new UnsupportedOperationException("Node " + schema + " is leaf type node. Child nodes not allowed");
     }
 
     @Override
@@ -50,8 +49,8 @@ final class ValueNodeModificationStrategy<T extends DataSchemaNode> extends Sche
     @Override
     protected TreeNode applyTouch(final ModifiedNode modification, final TreeNode currentMeta,
             final Version version) {
-        throw new UnsupportedOperationException("Node " + schema.getPath()
-                + " is leaf type node. Subtree change is not allowed.");
+        throw new UnsupportedOperationException("Node " + schema + " is leaf type node. "
+            + " Subtree change is not allowed.");
     }
 
     @Override