BUG-4556: Introduce StmtContext.getSchemaPath()
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / type / Decimal64SpecificationEffectiveStatementImpl.java
index d18c0b3ddef1df7f5109a24266e26b82603693b8..e8ee0aa436603ef7ecbc1852ff38884dc2e7f570 100644 (file)
@@ -29,7 +29,6 @@ import org.opendaylight.yangtools.yang.model.util.ExtendedType;
 import org.opendaylight.yangtools.yang.model.util.ExtendedType.Builder;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.TypeUtils;
-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.FractionDigitsEffectiveStatementImpl;
 
@@ -85,13 +84,13 @@ public class Decimal64SpecificationEffectiveStatementImpl extends
         if (!initRanges.isEmpty() && validateRanges(initRanges)) {
             isExtended = true;
             rangeConstraints = ImmutableList.copyOf(initRanges);
-            SchemaPath parentPath = Utils.getSchemaPath(ctx.getParentContext());
+            SchemaPath parentPath = ctx.getParentContext().getSchemaPath().get();
             extendedTypeQName = QName.create(parentPath.getLastComponent().getModule(), QNAME.getLocalName());
             path = parentPath.createChild(extendedTypeQName);
         } else {
             isExtended = false;
             rangeConstraints = DEFAULT_RANGE_STATEMENTS;
-            path = Utils.getSchemaPath(ctx.getParentContext()).createChild(QNAME);
+            path = ctx.getParentContext().getSchemaPath().get().createChild(QNAME);
         }
     }