mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8206980: ZonedDateTime could not parse timezone name with zh_CN locale correctly
Reviewed-by: rriggs
This commit is contained in:
parent
0922828415
commit
fa3591db42
2 changed files with 11 additions and 7 deletions
|
@ -130,7 +130,8 @@ public class CLDRTimeZoneNameProviderImpl extends TimeZoneNameProviderImpl {
|
||||||
|
|
||||||
// Fill in for the empty names.
|
// Fill in for the empty names.
|
||||||
// English names are prefilled for performance.
|
// English names are prefilled for performance.
|
||||||
if (locale.getLanguage() != "en") {
|
if (!locale.equals(Locale.ENGLISH) &&
|
||||||
|
!locale.equals(Locale.US)) {
|
||||||
for (int zoneIndex = 0; zoneIndex < ret.length; zoneIndex++) {
|
for (int zoneIndex = 0; zoneIndex < ret.length; zoneIndex++) {
|
||||||
deriveFallbackNames(ret[zoneIndex], locale);
|
deriveFallbackNames(ret[zoneIndex], locale);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ import org.testng.annotations.Test;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8081022 8151876 8166875 8189784
|
* @bug 8081022 8151876 8166875 8189784 8206980
|
||||||
* @key randomness
|
* @key randomness
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -156,12 +156,15 @@ public class TestZoneTextPrinterParser extends AbstractTestPrinterParser {
|
||||||
{"America/Chicago", "CST", none, Locale.ENGLISH, TextStyle.SHORT},
|
{"America/Chicago", "CST", none, Locale.ENGLISH, TextStyle.SHORT},
|
||||||
{"Asia/Taipei", "CST", preferred, Locale.ENGLISH, TextStyle.SHORT},
|
{"Asia/Taipei", "CST", preferred, Locale.ENGLISH, TextStyle.SHORT},
|
||||||
{"Australia/South", "ACST", preferred_s, Locale.ENGLISH, TextStyle.SHORT},
|
{"Australia/South", "ACST", preferred_s, Locale.ENGLISH, TextStyle.SHORT},
|
||||||
{"America/Chicago", "CDT", none, Locale.ENGLISH, TextStyle.SHORT},
|
{"America/Chicago", "CDT", none, Locale.ENGLISH, TextStyle.SHORT},
|
||||||
{"Asia/Shanghai", "CDT", preferred_s, Locale.ENGLISH, TextStyle.SHORT},
|
{"Asia/Shanghai", "CDT", preferred_s, Locale.ENGLISH, TextStyle.SHORT},
|
||||||
{"America/Juneau", "AKST", none, Locale.ENGLISH, TextStyle.SHORT},
|
{"America/Juneau", "AKST", none, Locale.ENGLISH, TextStyle.SHORT},
|
||||||
{"America/Juneau", "AKDT", none, Locale.ENGLISH, TextStyle.SHORT},
|
{"America/Juneau", "AKDT", none, Locale.ENGLISH, TextStyle.SHORT},
|
||||||
{"Pacific/Honolulu", "HST", none, Locale.ENGLISH, TextStyle.SHORT},
|
{"Pacific/Honolulu", "HST", none, Locale.ENGLISH, TextStyle.SHORT},
|
||||||
{"America/Halifax", "AST", none, Locale.ENGLISH, TextStyle.SHORT},
|
{"America/Halifax", "AST", none, Locale.ENGLISH, TextStyle.SHORT},
|
||||||
|
{"Z", "Z", none, Locale.ENGLISH, TextStyle.SHORT},
|
||||||
|
{"Z", "Z", none, Locale.US, TextStyle.SHORT},
|
||||||
|
{"Z", "Z", none, Locale.CANADA, TextStyle.SHORT},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue