< prev index next >

src/java.base/share/native/libjava/System.c

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

@@ -209,11 +209,10 @@
     PUTPROP(props, "java.specification.name",
             "Java Platform API Specification");
     PUTPROP(props, "java.specification.vendor",
             JAVA_SPECIFICATION_VENDOR);
 
-    PUTPROP(props, "java.version", VERSION_SHORT);
     PUTPROP(props, "java.vendor", VENDOR);
     PUTPROP(props, "java.vendor.url", VENDOR_URL);
     PUTPROP(props, "java.vendor.url.bug", VENDOR_URL_BUG);
 
     jio_snprintf(buf, sizeof(buf), "%d.%d", JVM_CLASSFILE_MAJOR_VERSION,

@@ -253,12 +252,14 @@
         PUTPROP(props, "sun.stderr.encoding", sprops->sun_stderr_encoding);
     }
 
     /* unicode_encoding specifies the default endianness */
     PUTPROP(props, "sun.io.unicode.encoding", sprops->unicode_encoding);
-    PUTPROP(props, "sun.cpu.isalist",
-            (sprops->cpu_isalist ? sprops->cpu_isalist : ""));
+    if (sprops->cpu_isalist  != NULL) {
+        // leave undefined if none
+        PUTPROP(props, "sun.cpu.isalist", sprops->cpu_isalist);
+    }
     PUTPROP(props, "sun.cpu.endian",  sprops->cpu_endian);
 
 
 #ifdef MACOSX
     /* Proxy setting properties */

@@ -328,12 +329,14 @@
     }
     PUTPROP(props, "sun.arch.data.model",  \
                     sprops->data_model);
 
     /* patch level */
+    if (sprops->patch_level != NULL) {
     PUTPROP(props, "sun.os.patch.level",  \
                     sprops->patch_level);
+    }
 
     /* Java2D properties */
     /* Note: java.awt.graphicsenv is an implementation private property which
      * just happens to have a java.* name because it is referenced in
      * a java.awt class. It is the mechanism by which the implementation

@@ -352,13 +355,10 @@
 
     PUTPROP_ForPlatformNString(props, "java.io.tmpdir", sprops->tmp_dir);
 
     PUTPROP_ForPlatformNString(props, "user.name", sprops->user_name);
     PUTPROP_ForPlatformNString(props, "user.home", sprops->user_home);
-
-    PUTPROP(props, "user.timezone", sprops->timezone);
-
     PUTPROP_ForPlatformNString(props, "user.dir", sprops->user_dir);
 
     /* This is a sun. property as it is currently only set for Gnome and
      * Windows desktops.
      */
< prev index next >