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 fc6b38a8f6
commit ab859fcc96
14 changed files with 15 additions and 15 deletions

View File

@@ -225,7 +225,7 @@ public class UriTemplate implements Serializable {
throw new IllegalArgumentException(
"No custom regular expression specified after ':' in \"" + variable + "\"");
}
String regex = variable.substring(idx + 1, variable.length());
String regex = variable.substring(idx + 1);
pattern.append('(');
pattern.append(regex);
pattern.append(')');