[YANGTOOLS-1115] StmtNamespaceContext is retained needlessly in xpath expressions Created: 24/Jun/20  Updated: 28/Oct/20  Resolved: 30/Jun/20

Status: Resolved
Project: yangtools
Component/s: xpath
Affects Version/s: None
Fix Version/s: 5.0.4, 4.0.11, 3.0.13

Type: Bug Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot_20200624_133740.png    
Issue Links:
Relates
relates to YANGTOOLS-1116 Disconnect StmtNamespaceContext from ... Resolved
Epic Link: Parser Performance

 Description   

WhenEffectiveStatementImpl with an expression ends up retaining AntlrYangXPathExpression.Qualifed.

This class retains a reference StmtNamespaceContext, which in turn ends up retaining quite a bit of BuildGlobalContext.

While there are cases when this would be necessary, if an XPathExpression does not contain a YangLiteralExpr there is no way the context could/should be referenced, hence we should be losing it and throw ... IllegalArgumentException or similar – as the YangLiteralExpr is invalid anyway.


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