8340477: Remove JDK1.1 compatible behavior for "EST", "MST", and "HST" time zones

Reviewed-by: iris, jlu, joehw
This commit is contained in:
Naoto Sato 2024-10-21 17:20:50 +00:00
parent 97c9212842
commit 71583222eb
5 changed files with 9 additions and 284 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -593,15 +593,6 @@ public abstract class TimeZone implements Serializable, Cloneable {
// delegate to default TZ which is effectively immutable
return defaultZone.toZoneId();
}
// derive it ourselves
if (ZoneInfoFile.useOldMapping() && id.length() == 3) {
if ("EST".equals(id))
return ZoneId.of("America/New_York");
if ("MST".equals(id))
return ZoneId.of("America/Denver");
if ("HST".equals(id))
return ZoneId.of("America/Honolulu");
}
return ZoneId.of(id, ZoneId.SHORT_IDS);
}