mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-24 15:49:26 +00:00
Merge branch '6.2.x'
This commit is contained in:
-19
@@ -183,7 +183,6 @@ class InternalPathPatternParser {
|
||||
if (this.pathElementStart != -1) {
|
||||
pushPathElement(createPathElement());
|
||||
}
|
||||
verifyPatternElements(this.headPE);
|
||||
return new PathPattern(pathPattern, this.parser, this.headPE);
|
||||
}
|
||||
|
||||
@@ -439,22 +438,4 @@ class InternalPathPatternParser {
|
||||
this.capturedVariableNames.add(variableName);
|
||||
}
|
||||
|
||||
private void verifyPatternElements(@Nullable PathElement headPE) {
|
||||
PathElement currentElement = headPE;
|
||||
while (currentElement != null) {
|
||||
if (currentElement instanceof CaptureSegmentsPathElement ||
|
||||
currentElement instanceof WildcardSegmentsPathElement) {
|
||||
PathElement nextElement = currentElement.next;
|
||||
while (nextElement instanceof SeparatorPathElement) {
|
||||
nextElement = nextElement.next;
|
||||
}
|
||||
if (nextElement != null && !(nextElement instanceof LiteralPathElement)) {
|
||||
throw new PatternParseException(nextElement.pos, this.pathPatternData,
|
||||
PatternMessage.MULTISEGMENT_PATHELEMENT_NOT_FOLLOWED_BY_LITERAL);
|
||||
}
|
||||
}
|
||||
currentElement = currentElement.next;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-1
@@ -101,7 +101,6 @@ public class PatternParseException extends IllegalArgumentException {
|
||||
ILLEGAL_CHARACTER_IN_CAPTURE_DESCRIPTOR("Char ''{0}'' is not allowed in a captured variable name"),
|
||||
CANNOT_HAVE_MANY_MULTISEGMENT_PATHELEMENTS("Multiple '{*...}' or '**' pattern elements are not allowed"),
|
||||
INVALID_LOCATION_FOR_MULTISEGMENT_PATHELEMENT("'{*...}' or '**' pattern elements should be placed at the start or end of the pattern"),
|
||||
MULTISEGMENT_PATHELEMENT_NOT_FOLLOWED_BY_LITERAL("'{*...}' or '**' pattern elements should be followed by a literal path element"),
|
||||
BADLY_FORMED_CAPTURE_THE_REST("Expected form when capturing the rest of the path is simply '{*...}'"),
|
||||
MISSING_REGEX_CONSTRAINT("Missing regex constraint on capture"),
|
||||
ILLEGAL_DOUBLE_CAPTURE("Not allowed to capture ''{0}'' twice in the same pattern"),
|
||||
|
||||
Reference in New Issue
Block a user