When we are evaluating a deref() call we need to make sure we
strip the string completely, otherwise we would arrive at incorrect
path.
JIRA: YANGTOOLS-1050
Change-Id: I36b45677243bcb8ccbf91f8813f082dbddee2a6a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
2e7e6dc6ee82447a286e4df18415de4bff6c2b4e)
final int paren = xpath.indexOf(')', 6);
checkArgument(paren != -1, "Cannot find matching parentheses in %s", xpath);
- final String derefArg = xpath.substring(6, paren);
+ final String derefArg = SPACE.trimFrom(xpath.substring(6, paren));
// Look up the node which we need to reference
final SchemaNode derefTarget = findTargetNode(context, resolveRelativePath(context, module, actualSchemaNode,
doSplitXPath(derefArg)));