You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2013/01/03 07:22:12 UTC

[jira] [Resolved] (LANG-865) LocaleUtils.toLocale does not parse strings starting with an underscore

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

Gary Gregory resolved LANG-865.
-------------------------------

    Resolution: Fixed

Thank you for the patch! 

Gary

commit -m "[LANG-865] LocaleUtils.toLocale does not parse strings starting with an underscore." C:/svn/org/apache/commons/trunks-proper/lang/src/main/java/org/apache/commons/lang3/LocaleUtils.java C:/svn/org/apache/commons/trunks-proper/lang/src/test/java/org/apache/commons/lang3/LocaleUtilsTest.java C:/svn/org/apache/commons/trunks-proper/lang/src/changes/changes.xml
    Sending        C:/svn/org/apache/commons/trunks-proper/lang/src/changes/changes.xml
    Sending        C:/svn/org/apache/commons/trunks-proper/lang/src/main/java/org/apache/commons/lang3/LocaleUtils.java
    Sending        C:/svn/org/apache/commons/trunks-proper/lang/src/test/java/org/apache/commons/lang3/LocaleUtilsTest.java
    Transmitting file data ...
    Committed revision 1428174.
                
> LocaleUtils.toLocale does not parse strings starting with an underscore
> -----------------------------------------------------------------------
>
>                 Key: LANG-865
>                 URL: https://issues.apache.org/jira/browse/LANG-865
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 3.1
>            Reporter: Endre Jeges
>              Labels: patch
>             Fix For: 3.2
>
>         Attachments: LANG-865.patch
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> Hi,
> Javadocs of Locale.toString() states that "If the language is missing, the string will begin with an underbar.". This is not handled in the LocaleUtils.toLocale method if it is meant to be the inversion method of Locale.toString().
> The fix for the ticket 328 does not handle well the case "fr__P", which I found out during fixing the first bug.
> I am attaching the patch for both problems.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira