8274879: Replace uses of StringBuffer with StringBuilder within java.base classes

Reviewed-by: naoto
This commit is contained in:
Andrey Turbanov 2021-10-27 16:18:12 +00:00 committed by Naoto Sato
parent e6fa5fa37e
commit 9a3e954299
11 changed files with 31 additions and 31 deletions

View file

@ -78,7 +78,7 @@ public class AttributedString {
}
else {
// Build the String contents
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
for (int counter = 0; counter < iterators.length; counter++) {
appendContents(buffer, iterators[counter]);
}
@ -668,9 +668,9 @@ public class AttributedString {
/**
* Appends the contents of the CharacterIterator iterator into the
* StringBuffer buf.
* StringBuilder buf.
*/
private final void appendContents(StringBuffer buf,
private final void appendContents(StringBuilder buf,
CharacterIterator iterator) {
int index = iterator.getBeginIndex();
int end = iterator.getEndIndex();