Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8213551

Initial value of user.timezone system property change

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 12
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      low
    • Compatibility Risk Description:
      Hide
      The user.timezone system property is not specified to have any particular initial value and there is no expectation of a non-null value for the system property. With this change System.getProperty("user.timezone") may return null and code expecting a non-null will see a NullPointerException. The risk is minimal since the expectation is that without overriding the user.timezone the implementation will use the OS timezone when it is initialized on first use and that has been the implementation since 2007.
      Show
      The user.timezone system property is not specified to have any particular initial value and there is no expectation of a non-null value for the system property. With this change System.getProperty("user.timezone") may return null and code expecting a non-null will see a NullPointerException. The risk is minimal since the expectation is that without overriding the user.timezone the implementation will use the OS timezone when it is initialized on first use and that has been the implementation since 2007.
    • Interface Kind:
      System or security property
    • Scope:
      SE

      Description

      Summary

      The initial value of the system property user.timezone is changed from the empty string to undefined.

      Problem

      The initial value used for the default timezone is unnecessarily split between native code and the java.util.TimeZone implementation.
      The split has a very small maintenance cost and very small performance impact.

      Solution

      Removing the initialization of user.timezone to the empty string enables some code cleanup and avoids the overhead of processing the property value when it is the default value.

      This change does not change the ability to set user.timezone property on the command line using -Duser.timezone=xxx.

      Specification

      This is a behavior change only, there is no specification of the initial value of the user.timezone property.

      The user.timezone system property will be undefined unless set using a command line argument -Duser.timezone=xxx.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rriggs Roger Riggs
                Reporter:
                alanb Alan Bateman
                Reviewed By:
                Mandy Chung
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: