Bug 4656: Yang parser does not determine configuration true or false properly
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / AbstractEffectiveDataSchemaNode.java
index c273cb5862d5018cadef53fe8fa40f6a6ae903b6..b8863bda726c896d8ef12ed9a75dac1f6558756b 100644 (file)
@@ -27,9 +27,7 @@ abstract class AbstractEffectiveDataSchemaNode<D extends DeclaredStatement<QName
     public AbstractEffectiveDataSchemaNode(final StmtContext<QName, D, ?> ctx) {
         super(ctx);
         this.constraints = EffectiveConstraintDefinitionImpl.forParent(this);
-
-        ConfigEffectiveStatementImpl configStmt = firstEffective(ConfigEffectiveStatementImpl.class);
-        this.configuration = (configStmt == null) ? true : configStmt.argument();
+        this.configuration = ctx.isConfiguration();
 
         // initCopyType
         List<TypeOfCopy> copyTypesFromOriginal = ctx.getCopyHistory();