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:
Roger Riggs 2018-11-09 13:28:16 -05:00
parent 1b20a6781f
commit 29e742273e
12 changed files with 311 additions and 184 deletions

View file

@ -661,12 +661,6 @@ GetJavaProperties(JNIEnv* env)
userDefaultUILang = userDefaultLCID;
}
SetupI18nProps(userDefaultUILang,
&sprops.language,
&sprops.script,
&sprops.country,
&sprops.variant,
&display_encoding);
SetupI18nProps(userDefaultLCID,
&sprops.format_language,
&sprops.format_script,
@ -710,17 +704,12 @@ GetJavaProperties(JNIEnv* env)
}
sprops.unicode_encoding = "UnicodeLittle";
/* 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.
*/
sprops.timezone = "";
}
/* User TIMEZONE
* We defer setting up timezone until it's actually necessary.
* Refer to TimeZone.getDefault(). The system property
* is able to be set by the command line interface -Duser.timezone.
*/
/* Current directory */
{