[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: |
|
||||||||
| Issue Links: |
|
||||||||
| 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. |