8206980: ZonedDateTime could not parse timezone name with zh_CN locale correctly

Reviewed-by: rriggs
This commit is contained in:
Naoto Sato 2018-07-11 14:47:43 -07:00
parent 0922828415
commit fa3591db42
2 changed files with 11 additions and 7 deletions

View file

@ -130,7 +130,8 @@ public class CLDRTimeZoneNameProviderImpl extends TimeZoneNameProviderImpl {
// Fill in for the empty names.
// 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++) {
deriveFallbackNames(ret[zoneIndex], locale);
}