Update SchemaPath.getPath() implementation
[yangtools.git] / yang / rfc8040-parser-support / src / main / java / org / opendaylight / yangtools / rfc8040 / parser / YangDataEffectiveStatementImpl.java
index c12019d474bb03444cb0e0597c661cd115ddac44..1898e738d1f72fe5bda58572a2aef95b023f84e3 100644 (file)
@@ -41,7 +41,7 @@ final class YangDataEffectiveStatementImpl extends UnknownEffectiveStatementBase
         super(stmt, substatements);
         this.argumentQName = requireNonNull(qname);
 
-        path = SchemaPathSupport.wrap(stmt.getEffectiveParent().getSchemaPath().createChild(qname));
+        path = SchemaPathSupport.toOptionalPath(stmt.getEffectiveParent().getSchemaPath().createChild(qname));
         container = findFirstEffectiveSubstatement(ContainerEffectiveStatement.class).get();
 
         // TODO: this is strong binding of two API contracts. Unfortunately ContainerEffectiveStatement design is