Fix RegexPathElement when matching variables against a root path
The first fix for issue 15264 covered the case of using a single variable (the case mentioned in the bug report). However, when more than one variable is used a different PathElement is built. This RegexPathElement needs a similar change that checks the path includes data to bind. Issue: SPR-15264
This commit is contained in:
@@ -125,7 +125,9 @@ class RegexPathElement extends PathElement {
|
||||
if (matches) {
|
||||
if (next == null) {
|
||||
// No more pattern, is there more data?
|
||||
matches = (p == matchingContext.candidateLength);
|
||||
// If pattern is capturing variables there must be some actual data to bind to them
|
||||
matches = (p == matchingContext.candidateLength &&
|
||||
((this.variableNames.size() == 0) ? true : p > candidateIndex));
|
||||
}
|
||||
else {
|
||||
if (matchingContext.isMatchStartMatching && p == matchingContext.candidateLength) {
|
||||
|
||||
Reference in New Issue
Block a user