mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8274879: Replace uses of StringBuffer with StringBuilder within java.base classes
Reviewed-by: naoto
This commit is contained in:
parent
e6fa5fa37e
commit
9a3e954299
11 changed files with 31 additions and 31 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue