Create all effective statements path Nullable
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / type / Decimal64SpecificationSupport.java
index e40f70356b5e85c869b54f592912d361060732fe..3e784ca246f420ae46b396a86a7cadc3257b6813 100644 (file)
@@ -48,7 +48,7 @@ final class Decimal64SpecificationSupport extends BaseStatementSupport<String, D
     @Override
     protected Decimal64Specification createDeclared(final StmtContext<String, Decimal64Specification, ?> ctx,
             final ImmutableList<? extends DeclaredStatement<?>> substatements) {
-        return new Decimal64SpecificationImpl(ctx.coerceRawStatementArgument(), substatements);
+        return new Decimal64SpecificationImpl(ctx.getRawArgument(), substatements);
     }
 
     @Override
@@ -64,7 +64,7 @@ final class Decimal64SpecificationSupport extends BaseStatementSupport<String, D
             throw noFracDigits(stmt);
         }
 
-        final DecimalTypeBuilder builder = BaseTypes.decimalTypeBuilder(stmt.getSchemaPath());
+        final DecimalTypeBuilder builder = BaseTypes.decimalTypeBuilder(stmt.wrapSchemaPath());
         for (final EffectiveStatement<?, ?> subStmt : substatements) {
             if (subStmt instanceof FractionDigitsEffectiveStatement) {
                 builder.setFractionDigits(((FractionDigitsEffectiveStatement) subStmt).argument());
@@ -85,6 +85,6 @@ final class Decimal64SpecificationSupport extends BaseStatementSupport<String, D
          *     The "fraction-digits" statement, which is a substatement to the
          *     "type" statement, MUST be present if the type is "decimal64".
          */
-        return new SourceException("At least one fraction-digits statement has to be present", stmt.sourceReference());
+        return new SourceException("At least one fraction-digits statement has to be present", stmt);
     }
 }
\ No newline at end of file