diff src/java.base/share/native/libjava/System.c @ 49292:dde7eaaa3ddc

8199756: Simplify language, country, script, and variant property initialization Reviewed-by: mchung, naoto, alanb
author rriggs
date Fri, 23 Mar 2018 11:53:11 -0400
parents b43edd41622d
children
line wrap: on
line diff
--- a/src/java.base/share/native/libjava/System.c	Fri Mar 23 16:50:02 2018 +0100
+++ b/src/java.base/share/native/libjava/System.c	Fri Mar 23 11:53:11 2018 -0400
@@ -244,21 +244,8 @@
     PUTPROP(props, "line.separator", sprops->line_separator);
 
     /*
-     *  user.language
-     *  user.script, user.country, user.variant (if user's environment specifies them)
-     *  file.encoding
+     * file encoding for stdout and stderr
      */
-    PUTPROP(props, "user.language", sprops->language);
-    if (sprops->script) {
-        PUTPROP(props, "user.script", sprops->script);
-    }
-    if (sprops->country) {
-        PUTPROP(props, "user.country", sprops->country);
-    }
-    if (sprops->variant) {
-        PUTPROP(props, "user.variant", sprops->variant);
-    }
-    PUTPROP(props, "file.encoding", sprops->encoding);
     if (sprops->sun_stdout_encoding != NULL) {
         PUTPROP(props, "sun.stdout.encoding", sprops->sun_stdout_encoding);
     }
@@ -314,7 +301,7 @@
 #endif
 
     /* !!! DO NOT call PUTPROP_ForPlatformNString before this line !!!
-     * !!! I18n properties have not been set up yet !!!
+     * !!! The platform native encoding for strings has not been set up yet !!!
      */
     InitializeEncoding(env, sprops->sun_jnu_encoding);
 
@@ -379,17 +366,6 @@
         PUTPROP(props, "sun.desktop", sprops->desktop);
     }
 
-    /*
-     * unset "user.language", "user.script", "user.country", and "user.variant"
-     * in order to tell whether the command line option "-DXXXX=YYYY" is
-     * specified or not.  They will be reset in fillI18nProps() below.
-     */
-    REMOVEPROP(props, "user.language");
-    REMOVEPROP(props, "user.script");
-    REMOVEPROP(props, "user.country");
-    REMOVEPROP(props, "user.variant");
-    REMOVEPROP(props, "file.encoding");
-
     ret = JVM_InitProperties(env, props);
 
     /* reconstruct i18n related properties */