Replace use of StringBuffer with StringBuilder
With JDK 9, java.util.regex.Matcher received overloaded variants of appendReplacement() and appendTail() that accept a StringBuilder, allowing us to replace the use of StringBuffer with StringBuilder. Closes gh-27822
This commit is contained in:
committed by
Sam Brannen
parent
2ed7268ded
commit
948f5999c3
@@ -256,7 +256,7 @@ public abstract class UriComponents implements Serializable {
|
||||
source = sanitizeSource(source);
|
||||
}
|
||||
Matcher matcher = NAMES_PATTERN.matcher(source);
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while (matcher.find()) {
|
||||
String match = matcher.group(1);
|
||||
String varName = getVariableName(match);
|
||||
|
||||
Reference in New Issue
Block a user