BUG-4556: Introduce StmtContext.getSchemaPath()
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / type / LeafrefSpecificationEffectiveStatementImpl.java
index 02f891c3cd26963734552b819425242996d1c144..8af6d8dfe7276d726711d433746e7fd18f0b2202 100644 (file)
@@ -23,7 +23,6 @@ import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.LeafrefSpeci
 import org.opendaylight.yangtools.yang.model.api.type.LeafrefTypeDefinition;
 import org.opendaylight.yangtools.yang.model.util.Leafref;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.Utils;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.EffectiveStatementBase;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.PathEffectiveStatementImpl;
 
@@ -43,7 +42,7 @@ public class LeafrefSpecificationEffectiveStatementImpl extends EffectiveStateme
     public LeafrefSpecificationEffectiveStatementImpl(final StmtContext<String, LeafrefSpecification, EffectiveStatement<String, LeafrefSpecification>> ctx) {
         super(ctx);
 
-        path = Utils.getSchemaPath(ctx.getParentContext()).createChild(QNAME);
+        path = ctx.getParentContext().getSchemaPath().get().createChild(QNAME);
 
         for (final EffectiveStatement<?, ?> effectiveStatement : effectiveSubstatements()) {
             if (effectiveStatement instanceof PathEffectiveStatementImpl) {