Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8025971

Remove java.time.ZoneId.OLD_SHORT_IDS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • 8
    • core-libs
    • None
    • b115
    • Verified

    Description

      JSR-310 has two special maps to support backwards compatible handling of the old/broken IDs HST/EST/MST. However, they are still available via the normal ZoneId.of(String) method which is a mistake.

      History. These three IDs were added in JDK 1.1 and were defined as DST bearing IDs equal to Pacific/Honolulu, America/New_York and America/Denver. In TZDB release 2005r the meanings were changed to be fixed offsets of -10:00, -05:00 and -07:00.

      Thee IDs were intended to be filtered from the TZDB data in JSR-310. They are not currently filtered and need to be to avoid ongoing confusion. The filtering must occur in TzdbZoneRulesProvider or the underlying TZDB compiler.

      Conversion from TimeZone to ZoneId is not affected as it uses the backwards compatibility map.
      http://download.java.net/jdk8/docs/api/java/time/ZoneId.html#OLD_SHORT_IDS

      Attachments

        Issue Links

          Activity

            People

              sherman Xueming Shen
              scolebourne Stephen Colebourne
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: