mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-5842 Refactored a variable
X-SVN-Rev: 22407
This commit is contained in:
parent
d0fc4c8217
commit
221cdc6607
1 changed files with 5 additions and 5 deletions
|
@ -22,7 +22,7 @@ public class DateFormatPerformanceTest extends PerfTest {
|
|||
|
||||
private com.ibm.icu.text.SimpleDateFormat[] icuDateFormat;
|
||||
|
||||
private java.text.SimpleDateFormat[] javaDateFormat;
|
||||
private java.text.SimpleDateFormat[] jdkDateFormat;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new DateFormatPerformanceTest().run(args);
|
||||
|
@ -40,10 +40,10 @@ public class DateFormatPerformanceTest extends PerfTest {
|
|||
locale = Locale.getDefault();
|
||||
|
||||
icuDateFormat = new com.ibm.icu.text.SimpleDateFormat[threads];
|
||||
javaDateFormat = new java.text.SimpleDateFormat[threads];
|
||||
jdkDateFormat = new java.text.SimpleDateFormat[threads];
|
||||
for (int i = 0; i < threads; i++) {
|
||||
icuDateFormat[i] = new com.ibm.icu.text.SimpleDateFormat(pattern, locale);
|
||||
javaDateFormat[i] = new java.text.SimpleDateFormat(pattern, locale);
|
||||
jdkDateFormat[i] = new java.text.SimpleDateFormat(pattern, locale);
|
||||
}
|
||||
|
||||
if (args.length == 2) {
|
||||
|
@ -89,7 +89,7 @@ public class DateFormatPerformanceTest extends PerfTest {
|
|||
return new PerfTest.Function() {
|
||||
public void call(int id) {
|
||||
try {
|
||||
javaDateFormat[id].parse(dateString);
|
||||
jdkDateFormat[id].parse(dateString);
|
||||
} catch (ParseException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class DateFormatPerformanceTest extends PerfTest {
|
|||
PerfTest.Function TestJDKFormat() {
|
||||
return new PerfTest.Function() {
|
||||
public void call(int id) {
|
||||
javaDateFormat[id].format(date);
|
||||
jdkDateFormat[id].format(date);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue