mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8349873: StackOverflowError after JDK-8342550 if -Duser.timezone= is set to a deprecated zone id
Reviewed-by: joehw, jlu, iris
This commit is contained in:
parent
d8fcd43a24
commit
3e7acfac48
2 changed files with 20 additions and 11 deletions
|
@ -47,7 +47,6 @@ import jdk.internal.util.StaticProperty;
|
|||
import sun.util.calendar.ZoneInfo;
|
||||
import sun.util.calendar.ZoneInfoFile;
|
||||
import sun.util.locale.provider.TimeZoneNameUtility;
|
||||
import sun.util.logging.PlatformLogger;
|
||||
|
||||
/**
|
||||
* {@code TimeZone} represents a time zone offset, and also figures out daylight
|
||||
|
@ -599,9 +598,9 @@ public abstract class TimeZone implements Serializable, Cloneable {
|
|||
|
||||
private static TimeZone getTimeZone(String ID, boolean fallback) {
|
||||
if (ZoneId.SHORT_IDS.containsKey(ID)) {
|
||||
PlatformLogger.getLogger(TimeZone.class.getName())
|
||||
.warning("Use of the three-letter time zone ID \"%s\" is deprecated and it will be removed in a future release"
|
||||
.formatted(ID));
|
||||
System.err.printf(
|
||||
"WARNING: Use of the three-letter time zone ID \"%s\" is deprecated and it will be removed in a future release%n",
|
||||
ID);
|
||||
}
|
||||
TimeZone tz = ZoneInfo.getTimeZone(ID);
|
||||
if (tz == null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue