[YANGTOOLS-1261] Reactor fails to assemble when extension has 'foo:bar/baz' argument Created: 25/Feb/21  Updated: 27/Feb/21  Resolved: 27/Feb/21

Status: Resolved
Project: yangtools
Component/s: parser
Affects Version/s: 5.0.8, 6.0.5
Fix Version/s: 5.0.9, 6.0.6

Type: Bug Priority: High
Reporter: Samuel Kontris Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: regression
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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):

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.


Generated at Wed Feb 07 20:55:38 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.