Merge pull request #32519 from dreis2211
* pr/32519: Avoid usage of StringBuffer where possible Closes gh-32519
This commit is contained in:
commit
9359760ee5
|
|
@ -111,7 +111,7 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
|
||||||
|
|
||||||
private String toKebabCase(String name) {
|
private String toKebabCase(String name) {
|
||||||
Matcher matcher = CAMEL_CASE_PATTERN.matcher(name);
|
Matcher matcher = CAMEL_CASE_PATTERN.matcher(name);
|
||||||
StringBuffer result = new StringBuffer();
|
StringBuilder result = new StringBuilder();
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
matcher.appendReplacement(result, matcher.group(1) + '-' + StringUtils.uncapitalize(matcher.group(2)));
|
matcher.appendReplacement(result, matcher.group(1) + '-' + StringUtils.uncapitalize(matcher.group(2)));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ public class DefaultLaunchScript implements LaunchScript {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String expandPlaceholders(String content, Map<?, ?> properties) throws IOException {
|
private String expandPlaceholders(String content, Map<?, ?> properties) throws IOException {
|
||||||
StringBuffer expanded = new StringBuffer();
|
StringBuilder expanded = new StringBuilder();
|
||||||
Matcher matcher = PLACEHOLDER_PATTERN.matcher(content);
|
Matcher matcher = PLACEHOLDER_PATTERN.matcher(content);
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
String name = matcher.group(1);
|
String name = matcher.group(1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue