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

Log warning for using JDK1.1 compatible time zone IDs for future removal

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • core-libs
    • None
    • b06
    • generic
    • generic

      Although they are clearly declared "deprecated" in java.util.TimeZone (https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/util/TimeZone.html#three-letter-time-zone-ids-heading), they still can be used to instantiate TimeZone instance.

      one-arg java.time.ZoneId.of() does not support those legacy IDs, but by using `ZoneId.SHORT_IDS` will create ZoneId instances for those IDs.

      To eventually get rid of those JDK 1.1 legacy IDs, it is desirable to log/display a warning messagel, if users try to instantiate TimeZone instances with those legacy IDs.

            naoto Naoto Sato
            naoto Naoto Sato
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: