Fix PathPattern incorrectly matching variable against root path

Issue: SPR-15264
This commit is contained in:
Andy Clement
2017-02-17 17:37:12 -08:00
parent 45df1d9fea
commit f1653cc21c
2 changed files with 27 additions and 1 deletions

View File

@@ -80,7 +80,8 @@ class CaptureVariablePathElement extends PathElement {
}
boolean match = false;
if (next == null) {
match = (nextPos == matchingContext.candidateLength);
// Needs to be at least one character #SPR15264
match = (nextPos == matchingContext.candidateLength && nextPos > candidateIndex);
}
else {
if (matchingContext.isMatchStartMatching && nextPos == matchingContext.candidateLength) {