On Wed, 11 Jan 2023 17:34:13 GMT, Naoto Sato <na...@openjdk.org> wrote:

>> In [JDK-4368016](https://bugs.openjdk.org/browse/JDK-4368016) 
>> **TimeZone.setDefaultZone()** was updated so that 
>> 
>> _TimeZone.java [will] not cause an NPE. If getSystemTimeZoneID()
>> can't determine the time zone from java.home and user.region properties,
>> it returns GMT._ 
>> 
>> This change updates the code to get rid of the no longer needed Try Catch
>
> src/java.base/share/classes/java/util/TimeZone.java line 678:
> 
>> 676:         if (zoneID == null || zoneID.isEmpty()) {
>> 677:             String javaHome = StaticProperty.javaHome();
>> 678:                 zoneID = getSystemTimeZoneID(javaHome);
> 
> Nit: align the indentation. Also, `javaHome` variable can be eliminated.

Thanks for catching that, fixed

-------------

PR: https://git.openjdk.org/jdk/pull/11951

Reply via email to