JDK-8342550 : Log warning for using JDK1.1 compatible time zone IDs for future removal
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2024-10-17
  • Updated: 2025-05-08
  • Resolved: 2025-01-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25 b06Fixed
Related Reports
Causes :  
Relates :  
Relates :  
Relates :  
Description
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.
Comments
Changeset: cfe70ebc Branch: master Author: Naoto Sato <naoto@openjdk.org> Date: 2025-01-15 17:15:05 +0000 URL: https://git.openjdk.org/jdk/commit/cfe70ebcb3a9fadceac5eccdc1f3353d0d74c235
15-01-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23049 Date: 2025-01-10 23:05:13 +0000
13-01-2025