ICU-8268 concatenation of strings using + in a loop is inefficient. Use StringBuilder.
X-SVN-Rev: 30720
This commit is contained in:
parent
811b9905c8
commit
b8f1bb9223
@ -1756,13 +1756,16 @@ public class DateTimePatternGenerator implements Freezable<DateTimePatternGenera
|
||||
}
|
||||
|
||||
private static String showMask(int mask) {
|
||||
String result = "";
|
||||
StringBuilder result = new StringBuilder();
|
||||
for (int i = 0; i < TYPE_LIMIT; ++i) {
|
||||
if ((mask & (1<<i)) == 0) continue;
|
||||
if (result.length() != 0) result += " | ";
|
||||
result += FIELD_NAME[i] + " ";
|
||||
if ((mask & (1<<i)) == 0)
|
||||
continue;
|
||||
if (result.length() != 0)
|
||||
result.append(" | ");
|
||||
result.append(FIELD_NAME[i]);
|
||||
result.append(" ");
|
||||
}
|
||||
return result;
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
static private String[] CLDR_FIELD_APPEND = {
|
||||
|
@ -384,11 +384,11 @@ final class RBBIDataWrapper {
|
||||
} else {
|
||||
int n;
|
||||
int state;
|
||||
String header = " Row Acc Look Tag";
|
||||
StringBuilder header = new StringBuilder(" Row Acc Look Tag");
|
||||
for (n=0; n<fHeader.fCatCount; n++) {
|
||||
header += intToString(n, 5);
|
||||
header.append(intToString(n, 5));
|
||||
}
|
||||
System.out.println(header);
|
||||
System.out.println(header.toString());
|
||||
for (n=0; n<header.length(); n++) {
|
||||
System.out.print("-");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user