harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao Shu (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6589) [classlib][luni] Cannot pick up proper user.language and user.country properties
Date Fri, 16 Jul 2010 09:56:49 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Xiao Shu updated HARMONY-6589:
------------------------------

    Attachment: Harmony-6589.diff

Th patch contains the fix.

In luniglob.c
change 
propRes = (*vmInterface)->SetSystemProperty (vmInterface, "user.language", "en");
propRes = (*vmInterface)->SetSystemProperty (vmInterface, "user.country", "US");
to
propRes = (*vmInterface)->SetSystemProperty (vmInterface, "user.language", (char *)hynls_get_language());
propRes = (*vmInterface)->SetSystemProperty (vmInterface, "user.country", (char *)hynls_get_region());

Thus user.language and user.country will pick proper value.

Since the values of the two system properties depends on system setting, I could not add a
unit tets case for it.


> [classlib][luni] Cannot pick up proper user.language and user.country properties
> --------------------------------------------------------------------------------
>
>                 Key: HARMONY-6589
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6589
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M14
>            Reporter: Xiao Shu
>         Attachments: Harmony-6589.diff
>
>
> Test with below test case:
> public class Test {
>     public static void main(String[] args) {
>         String lang = System.getProperty("user.language");
>         String country = System.getProperty("user.country");
>         System.out.println("user.language=" + lang);
>         System.out.println("user.contry=" + country);
>     }
> }
> it always print out 
> user.language=en
> user.contry=US
> even if system language and region are set to other values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message