Skip to content

Commit 7bf1de5

Browse files
committed
8384042: [BACKOUT] Incorrect handling of Hawaii_Aleutian metazone
Reviewed-by: jlu, iris
1 parent e324174 commit 7bf1de5

1 file changed

Lines changed: 20 additions & 26 deletions

File tree

make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -815,28 +815,6 @@ private static Map<String, Object> extractZoneNames(Map<String, Object> map, Str
815815
data = map.get(TIMEZONE_ID_PREFIX + tzLink);
816816
}
817817

818-
// Process metazones first, if any
819-
String meta = handlerMetaZones.get(tzKey);
820-
String[] metaNames = null;
821-
if (meta == null && tzLink != null) {
822-
// Check for tzLink
823-
meta = handlerMetaZones.get(tzLink);
824-
}
825-
if (meta != null) {
826-
var metaKey = METAZONE_ID_PREFIX + meta;
827-
if (map.get(metaKey) instanceof String[] mn) {
828-
metaNames = mn;
829-
}
830-
if (metaNames != null && isDefaultZone(meta, tzKey)) {
831-
// Record the metazone names only from the default
832-
// (001) zone, with short names filled from TZDB
833-
metaNames = Arrays.copyOf(metaNames, metaNames.length);
834-
fillTZDBShortNames(tzKey, metaNames);
835-
names.put(metaKey, metaNames);
836-
}
837-
}
838-
839-
// Put regular time zones
840818
if (data instanceof String[] tznames) {
841819
// Hack for UTC. UTC is an alias to Etc/UTC in CLDR
842820
if (tzid.equals("Etc/UTC") && !map.containsKey(TIMEZONE_ID_PREFIX + "UTC")) {
@@ -850,10 +828,26 @@ private static Map<String, Object> extractZoneNames(Map<String, Object> map, Str
850828
names.put(tzid, tznames);
851829
}
852830
} else {
853-
if (metaNames != null) {
854-
names.put(tzid, meta);
855-
if (tzLink != null && availableIds.contains(tzLink)) {
856-
names.put(tzLink, meta);
831+
String meta = handlerMetaZones.get(tzKey);
832+
if (meta == null && tzLink != null) {
833+
// Check for tzLink
834+
meta = handlerMetaZones.get(tzLink);
835+
}
836+
if (meta != null) {
837+
String metaKey = METAZONE_ID_PREFIX + meta;
838+
data = map.get(metaKey);
839+
if (data instanceof String[] tznames) {
840+
if (isDefaultZone(meta, tzKey)) {
841+
// Record the metazone names only from the default
842+
// (001) zone, with short names filled from TZDB
843+
tznames = Arrays.copyOf(tznames, tznames.length);
844+
fillTZDBShortNames(tzKey, tznames);
845+
names.put(metaKey, tznames);
846+
}
847+
names.put(tzid, meta);
848+
if (tzLink != null && availableIds.contains(tzLink)) {
849+
names.put(tzLink, meta);
850+
}
857851
}
858852
} else if (id.equals("root")) {
859853
// supply TZDB short names if available

0 commit comments

Comments
 (0)