-
Bug
-
Resolution: Done
-
High
-
5.0.8, 6.0.5
Identifier in extension in "must" statement is not parsed if specific conditions are met.
Conditions:
- extension for "must" statement is defined (extension "dependency" in this case)
- "dependency" points to another element in yang structure
- "dependency" contains prefix
- "dependency" contains "/" character
This case works if "dependency" contains "/" but does not contain prefix (shown it test case linked bellow).
This bug was not present until version 5.0.8 (in 5.0.7 and older).
Exception thrown:
"java.lang.IllegalArgumentException: String 'foo/bar' is not a valid identifier".
Exception is thrown in check method org.opendaylight.yangtools.yang.common.AbstractQName#checkContent
More information about this problem, steps-to-reproduce and example model can be found in gerrit changes (master branch seems OK):
- https://git.opendaylight.org/gerrit/c/yangtools/+/95362
- https://git.opendaylight.org/gerrit/c/yangtools/+/95000
- https://git.opendaylight.org/gerrit/c/yangtools/+/94999
Model used in test case is simplified version of tailf yang models (specifically "tailf-ncs-devices@2020-02-04.yang" model).
It looks like that this change started causing this problem: https://git.opendaylight.org/gerrit/c/yangtools/+/94082.
It fixes problem: "UnrecognizedEffectiveStatementImpl is mis-using StmtContextUtils.qnameFromArgument() to attempt to create a QName, suppressing reported exceptions.". So the exception is no longer suppressed.