jdk/src/share/classes/java/time/ZoneId.java
changeset 21286 0641a36bb610
parent 20873 e91d5b1cb8e6
child 22081 86eb26ff8f2b
--- a/jdk/src/share/classes/java/time/ZoneId.java	Thu Oct 17 22:22:14 2013 -0700
+++ b/jdk/src/share/classes/java/time/ZoneId.java	Thu Oct 17 23:43:08 2013 -0700
@@ -169,60 +169,15 @@
 public abstract class ZoneId implements Serializable {
 
     /**
-     * A map of zone overrides to enable the older short time-zone names to be used.
-     * <p>
-     * Use of short zone IDs has been deprecated in {@code java.util.TimeZone}.
-     * This map allows the IDs to continue to be used via the
-     * {@link #of(String, Map)} factory method.
-     * <p>
-     * This map contains an older mapping of the IDs, where 'EST', 'MST' and 'HST'
-     * map to IDs which include daylight savings.
-     * This is in line with versions of TZDB before 2005r.
-     * <p>
-     * This maps as follows:
-     * <ul>
-     * <li>EST - America/New_York</li>
-     * <li>MST - America/Denver</li>
-     * <li>HST - Pacific/Honolulu</li>
-     * <li>ACT - Australia/Darwin</li>
-     * <li>AET - Australia/Sydney</li>
-     * <li>AGT - America/Argentina/Buenos_Aires</li>
-     * <li>ART - Africa/Cairo</li>
-     * <li>AST - America/Anchorage</li>
-     * <li>BET - America/Sao_Paulo</li>
-     * <li>BST - Asia/Dhaka</li>
-     * <li>CAT - Africa/Harare</li>
-     * <li>CNT - America/St_Johns</li>
-     * <li>CST - America/Chicago</li>
-     * <li>CTT - Asia/Shanghai</li>
-     * <li>EAT - Africa/Addis_Ababa</li>
-     * <li>ECT - Europe/Paris</li>
-     * <li>IET - America/Indiana/Indianapolis</li>
-     * <li>IST - Asia/Kolkata</li>
-     * <li>JST - Asia/Tokyo</li>
-     * <li>MIT - Pacific/Apia</li>
-     * <li>NET - Asia/Yerevan</li>
-     * <li>NST - Pacific/Auckland</li>
-     * <li>PLT - Asia/Karachi</li>
-     * <li>PNT - America/Phoenix</li>
-     * <li>PRT - America/Puerto_Rico</li>
-     * <li>PST - America/Los_Angeles</li>
-     * <li>SST - Pacific/Guadalcanal</li>
-     * <li>VST - Asia/Ho_Chi_Minh</li>
-     * </ul>
-     * The map is unmodifiable.
-     */
-    public static final Map<String, String> OLD_SHORT_IDS;
-    /**
      * A map of zone overrides to enable the short time-zone names to be used.
      * <p>
      * Use of short zone IDs has been deprecated in {@code java.util.TimeZone}.
      * This map allows the IDs to continue to be used via the
      * {@link #of(String, Map)} factory method.
      * <p>
-     * This map contains a newer mapping of the IDs, where 'EST', 'MST' and 'HST'
-     * map to IDs which do not include daylight savings
-     * This is in line with TZDB 2005r and later.
+     * This map contains a mapping of the IDs that is in line with TZDB 2005r and
+     * later, where 'EST', 'MST' and 'HST' map to IDs which do not include daylight
+     * savings.
      * <p>
      * This maps as follows:
      * <ul>
@@ -259,42 +214,36 @@
      */
     public static final Map<String, String> SHORT_IDS;
     static {
-        Map<String, String> base = new HashMap<>();
-        base.put("ACT", "Australia/Darwin");
-        base.put("AET", "Australia/Sydney");
-        base.put("AGT", "America/Argentina/Buenos_Aires");
-        base.put("ART", "Africa/Cairo");
-        base.put("AST", "America/Anchorage");
-        base.put("BET", "America/Sao_Paulo");
-        base.put("BST", "Asia/Dhaka");
-        base.put("CAT", "Africa/Harare");
-        base.put("CNT", "America/St_Johns");
-        base.put("CST", "America/Chicago");
-        base.put("CTT", "Asia/Shanghai");
-        base.put("EAT", "Africa/Addis_Ababa");
-        base.put("ECT", "Europe/Paris");
-        base.put("IET", "America/Indiana/Indianapolis");
-        base.put("IST", "Asia/Kolkata");
-        base.put("JST", "Asia/Tokyo");
-        base.put("MIT", "Pacific/Apia");
-        base.put("NET", "Asia/Yerevan");
-        base.put("NST", "Pacific/Auckland");
-        base.put("PLT", "Asia/Karachi");
-        base.put("PNT", "America/Phoenix");
-        base.put("PRT", "America/Puerto_Rico");
-        base.put("PST", "America/Los_Angeles");
-        base.put("SST", "Pacific/Guadalcanal");
-        base.put("VST", "Asia/Ho_Chi_Minh");
-        Map<String, String> pre = new HashMap<>(base);
-        pre.put("EST", "America/New_York");
-        pre.put("MST", "America/Denver");
-        pre.put("HST", "Pacific/Honolulu");
-        OLD_SHORT_IDS = Collections.unmodifiableMap(pre);
-        Map<String, String> post = new HashMap<>(base);
-        post.put("EST", "-05:00");
-        post.put("MST", "-07:00");
-        post.put("HST", "-10:00");
-        SHORT_IDS = Collections.unmodifiableMap(post);
+        Map<String, String> map = new HashMap<>(64);
+        map.put("ACT", "Australia/Darwin");
+        map.put("AET", "Australia/Sydney");
+        map.put("AGT", "America/Argentina/Buenos_Aires");
+        map.put("ART", "Africa/Cairo");
+        map.put("AST", "America/Anchorage");
+        map.put("BET", "America/Sao_Paulo");
+        map.put("BST", "Asia/Dhaka");
+        map.put("CAT", "Africa/Harare");
+        map.put("CNT", "America/St_Johns");
+        map.put("CST", "America/Chicago");
+        map.put("CTT", "Asia/Shanghai");
+        map.put("EAT", "Africa/Addis_Ababa");
+        map.put("ECT", "Europe/Paris");
+        map.put("IET", "America/Indiana/Indianapolis");
+        map.put("IST", "Asia/Kolkata");
+        map.put("JST", "Asia/Tokyo");
+        map.put("MIT", "Pacific/Apia");
+        map.put("NET", "Asia/Yerevan");
+        map.put("NST", "Pacific/Auckland");
+        map.put("PLT", "Asia/Karachi");
+        map.put("PNT", "America/Phoenix");
+        map.put("PRT", "America/Puerto_Rico");
+        map.put("PST", "America/Los_Angeles");
+        map.put("SST", "Pacific/Guadalcanal");
+        map.put("VST", "Asia/Ho_Chi_Minh");
+        map.put("EST", "-05:00");
+        map.put("MST", "-07:00");
+        map.put("HST", "-10:00");
+        SHORT_IDS = Collections.unmodifiableMap(map);
     }
     /**
      * Serialization version.
@@ -314,7 +263,7 @@
      * @throws ZoneRulesException if the converted zone region ID cannot be found
      */
     public static ZoneId systemDefault() {
-        return ZoneId.of(TimeZone.getDefault().getID(), SHORT_IDS);
+        return TimeZone.getDefault().toZoneId();
     }
 
     /**