< prev index next >

src/java.base/unix/native/libjava/java_props_md.c

Print this page
rev 52426 : 8185496: Improve performance of system properties initialization in initPhase1
8213424: VersionProps duplicate and skipped initialization

@@ -397,11 +397,11 @@
 #else
     sprops.printerJob = "sun.print.PSPrinterJob";
 #endif
 
     /* patches/service packs installed */
-    sprops.patch_level = "unknown";
+    sprops.patch_level = NULL;      // leave it undefined
 
     /* Java 2D/AWT properties */
 #ifdef MACOSX
     // Always the same GraphicsEnvironment and Toolkit on Mac OS X
     sprops.graphics_env = "sun.awt.CGraphicsEnvironment";

@@ -486,23 +486,19 @@
                     &(sprops.format_script),
                     &(sprops.format_country),
                     &(sprops.format_variant),
                     &(sprops.encoding))) {
         ParseLocale(env, LC_MESSAGES,
-                    &(sprops.language),
-                    &(sprops.script),
-                    &(sprops.country),
-                    &(sprops.variant),
+                    &(sprops.display_language),
+                    &(sprops.display_script),
+                    &(sprops.display_country),
+                    &(sprops.display_variant),
                     NULL);
     } else {
-        sprops.language = "en";
+        sprops.display_language = "en";
         sprops.encoding = "ISO8859-1";
     }
-    sprops.display_language = sprops.language;
-    sprops.display_script = sprops.script;
-    sprops.display_country = sprops.country;
-    sprops.display_variant = sprops.variant;
 
     /* ParseLocale failed with OOME */
     JNU_CHECK_EXCEPTION_RETURN(env, NULL);
 
 #ifdef MACOSX

@@ -541,22 +537,16 @@
         if (sprops.user_home == NULL) {
             sprops.user_home = "?";
         }
     }
 
-    /* User TIMEZONE */
-    {
-        /*
+    /* User TIMEZONE
          * We defer setting up timezone until it's actually necessary.
-         * Refer to TimeZone.getDefault(). However, the system
-         * property is necessary to be able to be set by the command
-         * line interface -D. Here temporarily set a null string to
-         * timezone.
+     * Refer to TimeZone.getDefault(). The system property
+     * is able to be set by the command line interface -Duser.timezone.
          */
         tzset();        /* for compatibility */
-        sprops.timezone = "";
-    }
 
     /* Current directory */
     {
         char buf[MAXPATHLEN];
         errno = 0;
< prev index next >