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

@ -1264,8 +1264,8 @@ public final class CompactNumberFormat extends NumberFormat {
String zeros = "";
for (int j = 1; j >= 0 && start < pattern.length(); --j) {
StringBuffer prefix = new StringBuffer();
StringBuffer suffix = new StringBuffer();
StringBuilder prefix = new StringBuilder();
StringBuilder suffix = new StringBuilder();
boolean inQuote = false;
// The phase ranges from 0 to 2. Phase 0 is the prefix. Phase 1 is
// the section of the pattern with digits. Phase 2 is the suffix.
@ -1275,7 +1275,7 @@ public final class CompactNumberFormat extends NumberFormat {
int phase = 0;
// The affix is either the prefix or the suffix.
StringBuffer affix = prefix;
StringBuilder affix = prefix;
for (int pos = start; pos < pattern.length(); ++pos) {
char ch = pattern.charAt(pos);