Merge "BUG-576: modified parser to handle refinement of extension instances."
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / impl / CopyUtils.java
index 365c34379eba8e05df5292463ab68b71614cd97e..cb72d9a2a4f87ef6d6844d7917d78d9eeef1a286 100644 (file)
@@ -389,7 +389,7 @@ public final class CopyUtils {
 
     private static UsesNodeBuilder copyUses(final UsesNodeBuilder old, final Builder newParent) {
         UsesNodeBuilder copy = new UsesNodeBuilderImpl(newParent.getModuleName(), newParent.getLine(),
-                old.getGroupingPathAsString());
+                old.getGroupingPath());
         copy.setParent(newParent);
         copy.setGroupingDefinition(old.getGroupingDefinition());
         copy.setGrouping(old.getGroupingBuilder());
@@ -403,14 +403,13 @@ public final class CopyUtils {
 
     private static AugmentationSchemaBuilder copyAugment(final AugmentationSchemaBuilder old, final Builder newParent) {
         AugmentationSchemaBuilderImpl copy = new AugmentationSchemaBuilderImpl(newParent.getModuleName(),
-                newParent.getLine(), old.getTargetPathAsString(), old.getOrder());
+                newParent.getLine(), old.getTargetPathAsString(), old.getTargetPath(), old.getOrder());
         copy.setParent(newParent);
         copy.setCopyOf(old);
         copy.setDescription(old.getDescription());
         copy.setReference(old.getReference());
         copy.setStatus(old.getStatus());
         copy.addWhenCondition(old.getWhenCondition());
-        copy.setTargetNodeSchemaPath(old.getTargetNodeSchemaPath());
         for (DataSchemaNodeBuilder childNode : old.getChildNodeBuilders()) {
             copy.addChildNode(copy(childNode, copy, false));
         }
@@ -470,7 +469,7 @@ public final class CopyUtils {
             } else {
                 newQName = old.getQName();
             }
-            newSchemaPath = augment.getTargetNodeSchemaPath().createChild(newQName);
+            newSchemaPath = augment.getTargetPath().createChild(newQName);
         } else if (newParent instanceof SchemaNodeBuilder) {
             SchemaNodeBuilder parent = (SchemaNodeBuilder) newParent;
             QName parentQName = parent.getQName();