jdk/src/java.base/share/classes/java/util/TimeZone.java
changeset 37593 824750ada3d6
parent 32649 2ee9017c7597
child 37781 71ed5645f17c
equal deleted inserted replaced
37592:c80f098887f4 37593:824750ada3d6
   658     }
   658     }
   659 
   659 
   660     private static synchronized TimeZone setDefaultZone() {
   660     private static synchronized TimeZone setDefaultZone() {
   661         TimeZone tz;
   661         TimeZone tz;
   662         // get the time zone ID from the system properties
   662         // get the time zone ID from the system properties
   663         String zoneID = AccessController.doPrivileged(
   663         String zoneID = GetPropertyAction.getProperty("user.timezone");
   664                 new GetPropertyAction("user.timezone"));
       
   665 
   664 
   666         // if the time zone ID is not set (yet), perform the
   665         // if the time zone ID is not set (yet), perform the
   667         // platform to Java time zone ID mapping.
   666         // platform to Java time zone ID mapping.
   668         if (zoneID == null || zoneID.isEmpty()) {
   667         if (zoneID == null || zoneID.isEmpty()) {
   669             String javaHome = AccessController.doPrivileged(
   668             String javaHome = GetPropertyAction.getProperty("java.home");
   670                     new GetPropertyAction("java.home"));
       
   671             try {
   669             try {
   672                 zoneID = getSystemTimeZoneID(javaHome);
   670                 zoneID = getSystemTimeZoneID(javaHome);
   673                 if (zoneID == null) {
   671                 if (zoneID == null) {
   674                     zoneID = GMT_ID;
   672                     zoneID = GMT_ID;
   675                 }
   673                 }