diff --git a/src/java.base/share/classes/java/util/TimeZone.java b/src/java.base/share/classes/java/util/TimeZone.java index 036dc510b08..8837bda2beb 100644 --- a/src/java.base/share/classes/java/util/TimeZone.java +++ b/src/java.base/share/classes/java/util/TimeZone.java @@ -674,13 +674,8 @@ public abstract class TimeZone implements Serializable, Cloneable { // if the time zone ID is not set (yet), perform the // platform to Java time zone ID mapping. if (zoneID == null || zoneID.isEmpty()) { - String javaHome = StaticProperty.javaHome(); - try { - zoneID = getSystemTimeZoneID(javaHome); - if (zoneID == null) { - zoneID = GMT_ID; - } - } catch (NullPointerException e) { + zoneID = getSystemTimeZoneID(StaticProperty.javaHome()); + if (zoneID == null) { zoneID = GMT_ID; } }