The high level matchStarting API was removed a few commits ago.
This change tidies up by removing the supporting infrastructure
for that from the PathElements.
This commit is contained in:
Andy Clement 2017-09-07 14:03:46 -07:00
parent a8693bf947
commit 3956423afe
7 changed files with 1 additions and 25 deletions

View File

@ -111,10 +111,7 @@ class CaptureVariablePathElement extends PathElement {
}
}
else {
if (matchingContext.isMatchStartMatching && pathIndex == matchingContext.pathLength) {
match = true; // no more data but matches up to this point
}
else if (this.next != null) {
if (this.next != null) {
match = this.next.matches(pathIndex, matchingContext);
}
}

View File

@ -104,9 +104,6 @@ class LiteralPathElement extends PathElement {
}
}
else {
if (matchingContext.isMatchStartMatching && pathIndex == matchingContext.pathLength) {
return true; // no more data but everything matched so far
}
return (this.next != null && this.next.matches(pathIndex, matchingContext));
}
}

View File

@ -581,8 +581,6 @@ public class PathPattern implements Comparable<PathPattern> {
final int pathLength;
boolean isMatchStartMatching = false;
@Nullable
private Map<String, String> extractedUriVariables;
@ -613,10 +611,6 @@ public class PathPattern implements Comparable<PathPattern> {
return matchOptionalTrailingSeparator;
}
public void setMatchStartMatching(boolean b) {
isMatchStartMatching = b;
}
public void set(String key, String value, MultiValueMap<String,String> parameters) {
if (this.extractedUriVariables == null) {
this.extractedUriVariables = new HashMap<>();

View File

@ -153,9 +153,6 @@ class RegexPathElement extends PathElement {
}
}
else {
if (matchingContext.isMatchStartMatching && (pathIndex + 1 >= matchingContext.pathLength)) {
return true; // no more data but matches up to this point
}
matches = (this.next != null && this.next.matches(pathIndex + 1, matchingContext));
}
}

View File

@ -51,9 +51,6 @@ class SeparatorPathElement extends PathElement {
}
else {
pathIndex++;
if (matchingContext.isMatchStartMatching && pathIndex == matchingContext.pathLength) {
return true; // no more data but matches up to this point
}
return (this.next != null && this.next.matches(pathIndex, matchingContext));
}
}

View File

@ -111,9 +111,6 @@ class SingleCharWildcardedPathElement extends PathElement {
}
}
else {
if (matchingContext.isMatchStartMatching && pathIndex == matchingContext.pathLength) {
return true; // no more data but everything matched so far
}
return (this.next != null && this.next.matches(pathIndex, matchingContext));
}
}

View File

@ -73,9 +73,6 @@ class WildcardPathElement extends PathElement {
}
}
else {
if (matchingContext.isMatchStartMatching && pathIndex == matchingContext.pathLength) {
return true; // no more data but matches up to this point
}
// Within a path (e.g. /aa/*/bb) there must be at least one character to match the wildcard
if (segmentData == null || segmentData.length() == 0) {
return false;