Select copyPolicy for each StatementSupport class
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / type / AbstractLeafrefSpecificationSupport.java
index 11fd4f5424555650656121f203ce86fb0e1de5a5..c893b03613c0bd3098edbd4235463a4c53e1f543 100644 (file)
@@ -25,7 +25,7 @@ import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 abstract class AbstractLeafrefSpecificationSupport
         extends BaseStatementSupport<String, LeafrefSpecification, EffectiveStatement<String, LeafrefSpecification>> {
     AbstractLeafrefSpecificationSupport() {
-        super(YangStmtMapping.TYPE);
+        super(YangStmtMapping.TYPE, CopyPolicy.DECLARED_COPY);
     }
 
     @Override
@@ -52,7 +52,7 @@ abstract class AbstractLeafrefSpecificationSupport
             throw noPath(stmt);
         }
 
-        final LeafrefTypeBuilder builder = BaseTypes.leafrefTypeBuilder(stmt.getSchemaPath());
+        final LeafrefTypeBuilder builder = BaseTypes.leafrefTypeBuilder(stmt.wrapSchemaPath());
 
         for (final EffectiveStatement<?, ?> subStmt : substatements) {
             if (subStmt instanceof PathEffectiveStatement) {