From 0cae3eba566209dfacde474af1fb5f5a407477d4 Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Wed, 16 Oct 2024 12:33:17 -0700 Subject: [PATCH] Reflects review comments --- .../classes/sun/util/calendar/ZoneInfoFile.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java b/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java index c60d53c47f078..d6349f2cf2444 100644 --- a/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java +++ b/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java @@ -231,16 +231,6 @@ public Void run() { }); } - private static void addOldMapping() { - for (var key : ZoneId.SHORT_IDS.keySet()) { - switch (key) { - case "EST" -> aliases.put("EST", "America/Panama"); - case "MST" -> aliases.put("MST", "America/Phoenix"); - default -> aliases.put(key, ZoneId.SHORT_IDS.get(key)); - } - } - } - /** * Loads the rules from a DateInputStream * @@ -299,7 +289,9 @@ private static void load(DataInputStream dis) throws IOException { } } // old us time-zone names - addOldMapping(); + for (var key : ZoneId.SHORT_IDS.keySet()) { + aliases.put(key, ZoneId.SHORT_IDS.get(key)); + } } /////////////////////////Ser/////////////////////////////////