[ https://issues.apache.org/jira/browse/LANG-1312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15873810#comment-15873810 ]
ASF GitHub Bot commented on LANG-1312: -------------------------------------- GitHub user PascalSchumacher opened a pull request: https://github.com/apache/commons-lang/pull/239 LANG-1312: LocaleUtils#toLocale does not support language followed by… … UN M.49 numeric-3 area code You can merge this pull request into a Git repository by running: $ git pull https://github.com/PascalSchumacher/commons-lang lang_1312_area_code Alternatively you can review and apply these changes as the patch at: https://github.com/apache/commons-lang/pull/239.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #239 ---- commit ce3e3e03e4d561dfae565186b431a879a9afa920 Author: pascalschumacher <pascalschumac...@gmx.net> Date: 2017-02-19T19:39:05Z LANG-1312: LocaleUtils#toLocale does not support language followed by UN M.49 numeric-3 area code ---- > LocaleUtils#toLocale does not support language followed by UN M.49 numeric-3 > area code > -------------------------------------------------------------------------------------- > > Key: LANG-1312 > URL: https://issues.apache.org/jira/browse/LANG-1312 > Project: Commons Lang > Issue Type: Bug > Affects Versions: 3.5 > Reporter: Pascal Schumacher > Priority: Minor > > These all work: > {code:java} > System.out.println(new Locale("en", "001")); > System.out.println(new Locale("en", "150")); > System.out.println(new Locale("ar", "001")); > {java} > but these all fail with an IllegalArgumentException: > {code:java} > System.out.println(LocaleUtils.toLocale("en_001")); > System.out.println(LocaleUtils.toLocale("en_150")); > System.out.println(LocaleUtils.toLocale("ar_001")); > {java} -- This message was sent by Atlassian JIRA (v6.3.15#6346)