Do not retain namespace context when not needed 18/90818/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 29 Jun 2020 19:51:04 +0000 (21:51 +0200)
committerRobert Varga <nite@hq.sk>
Tue, 30 Jun 2020 10:55:47 +0000 (10:55 +0000)
commit4ba870da10c93c48524f86ebe847e3673645af94
tree5becf4bae3032e9c74d353b6aeed31b8e9b2f3b5
parentfcfbd4db4e024ab0d65789e249f01af6bea502de
Do not retain namespace context when not needed

If we have not recorded presence of a literal expression, there
is no legal way we can be asked to resolve a literal to either
a QName or a YangInstanceIdentifier.

Track creation of YangLiteralExprs, so that we can ditch the
namespace context we will not need it.

JIRA: YANGTOOLS-1115
Change-Id: If1572fc57d78eaaea7feb3025a5a161519df2b9a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 1cfaa0281c43f939cd64261e1605e8757d39aa2f)
yang/yang-xpath-impl/src/main/java/org/opendaylight/yangtools/yang/xpath/impl/AntlrXPathParser.java
yang/yang-xpath-impl/src/main/java/org/opendaylight/yangtools/yang/xpath/impl/AntlrYangXPathExpression.java