Refine use of substring operations

Closes gh-25445
This commit is contained in:
XenoAmess
2020-07-21 23:09:43 +08:00
committed by Sam Brannen
parent cdc234d7db
commit edfc6c0293
14 changed files with 15 additions and 15 deletions

View File

@@ -71,7 +71,7 @@ final class PatternMappingFilterProxy implements Filter {
private void addUrlPattern(String urlPattern) {
Assert.notNull(urlPattern, "Found null URL Pattern");
if (urlPattern.startsWith(EXTENSION_MAPPING_PATTERN)) {
this.endsWithMatches.add(urlPattern.substring(1, urlPattern.length()));
this.endsWithMatches.add(urlPattern.substring(1));
}
else if (urlPattern.equals(PATH_MAPPING_PATTERN)) {
this.startsWithMatches.add("");