RFR 8199756 : Simplify language, country, script, and variant property initialization

Roger Riggs roger.riggs at oracle.com
Mon Mar 19 13:55:04 UTC 2018


Hi Alan,

The original changeset [1] is most easily viewed in the jdk-8u repo.

The comment and placement of the removes of the properties and the code 
to re-set them
around the call to the JVM_InitProperties (which sets properties from the
-D arguments among others), seem to indicate that the previous property
values are irrelevant.

The remaining question is whether there are any side effects or usage of 
those
four property values between the time they are initially set and when 
they are removed.
The code in System.initProperties is straightforward and the bulk of the 
code
is simply setting property values, with one interspersed call to 
initialize the sun.jnu_encoding.

 From all appearances there are no side effects or uses of the initially 
set values of those four properties.

Thanks, Roger

[1] https://bugs.openjdk.java.net/browse/JDK-4700857
     RFE: separating user locale and user interface locale

On 3/17/18 5:46 AM, Alan Bateman wrote:
> On 16/03/2018 20:32, Roger Riggs wrote:
>> Please review a small simplification of the initialization of System 
>> properties for
>> language, country, script, and variant.  Some steps for initializing 
>> them are unnecessary.
>> The tests pass; a careful review would be appreciated so as to avoid 
>> breakage.
>>
>> Webrev:
>> http://cr.openjdk.java.net/~rriggs/webrev-prop-simplify-8199756/
>>
>> Issue:
>>   https://bugs.openjdk.java.net/browse/JDK-8199756
> There are subtle interactions with how system properties are set in 
> the VM and on the command line which will take a bit effort to 
> research in order to review this and be satisfied that the change is 
> safe. Have you dug into the ancient history and bugs to see why it was 
> done this way?
>
> -Alan



More information about the core-libs-dev mailing list