Check if we are operating in a grouping before issuing a warning 97/86897/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 14 Jan 2020 16:30:09 +0000 (17:30 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 14 Jan 2020 17:18:26 +0000 (18:18 +0100)
commit4934f5dc79475f2898d4ac32aebfb65aff39180d
treea51f45de3c2bc65b89d2fb4048f55cbaec5c8d9f
parentadf41b25c82b005f66a0de86a8e3c8a8a455cf76
Check if we are operating in a grouping before issuing a warning

If we are examining a list in a grouping, we should not be issuing
a warning, as we do not know where that grouping is going to be
instantiated.

Once we determine that a warning may be appropriate, walk statement
contexts upwards, searching for a grouping -- if we find one, just
bail out without any warning.

JIRA: YANGTOOLS-957
Change-Id: If54b05cc444f19f56c6f8b4f931d85b0b270b4ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/list/AbstractListStatementSupport.java