Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-1261

Reactor fails to assemble when extension has 'foo:bar/baz' argument

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • 5.0.9, 6.0.6
    • 5.0.8, 6.0.5
    • parser

      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.

            rovarga Robert Varga
            samuel.kontris Samuel Kontris
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: