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:
Marten Deinum
2021-12-15 19:44:50 +01:00
committed by Sam Brannen
parent 2ed7268ded
commit 948f5999c3
2 changed files with 3 additions and 3 deletions

View File

@@ -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);