Do not retain namespace context when not needed 20/90820/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 29 Jun 2020 19:51:04 +0000 (21:51 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 30 Jun 2020 10:07:53 +0000 (12:07 +0200)
commitf36741f36780d328f56a107b8c058060b3754459
tree656b1766daba72e63087dafe36c0c578c1963f3d
parent5602c77b39f3624148189e8bcfe501f2c022f61f
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