mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8185496
: Improve performance of system properties initialization in initPhase1
8213424: VersionProps duplicate and skipped initialization Reviewed-by: mchung, redestad, dholmes
This commit is contained in:
parent
1b20a6781f
commit
29e742273e
12 changed files with 311 additions and 184 deletions
|
@ -211,7 +211,6 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props)
|
|||
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);
|
||||
|
@ -255,8 +254,10 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props)
|
|||
|
||||
/* 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);
|
||||
|
||||
|
||||
|
@ -330,8 +331,10 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props)
|
|||
sprops->data_model);
|
||||
|
||||
/* patch level */
|
||||
PUTPROP(props, "sun.os.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
|
||||
|
@ -354,9 +357,6 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props)
|
|||
|
||||
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
|
||||
|
|
|
@ -56,23 +56,18 @@ typedef struct {
|
|||
nchar *user_name;
|
||||
nchar *user_home;
|
||||
|
||||
char *language;
|
||||
char *format_language;
|
||||
char *display_language;
|
||||
char *script;
|
||||
char *format_script;
|
||||
char *display_script;
|
||||
char *country;
|
||||
char *format_country;
|
||||
char *display_country;
|
||||
char *variant;
|
||||
char *format_variant;
|
||||
char *display_variant;
|
||||
char *encoding;
|
||||
char *sun_jnu_encoding;
|
||||
char *sun_stdout_encoding;
|
||||
char *sun_stderr_encoding;
|
||||
char *timezone;
|
||||
|
||||
char *printerJob;
|
||||
char *graphics_env;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue