[
https://issues.apache.org/jira/browse/LANG-915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergio Fernández updated LANG-915:
----------------------------------
Attachment: LANG-915.patch
Please, find attached a patch for solving the issue with the method
LocaleUtils.toLocale() and ISO 639-3 codes, including:
* Completely re-implementation of the locale parsing, due the complexity for
adapt the new feature in the current code.
* Implementation compliant with the current tests at LocaleUtilsTest. An
invalid assert has been removed.
* Added new test for testing 3-chars locale
* Added a new methof StringUtils.occurrences() which I commonly need, and I
needed for this path, although at the end I needed the splited array, so not
used in the submitted version. So it could be removed if you don't find it
relevant.
> Wrong locale handling in LocaleUtils.toLocale()
> -----------------------------------------------
>
> Key: LANG-915
> URL: https://issues.apache.org/jira/browse/LANG-915
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 3.1
> Reporter: Sergio Fernández
> Priority: Minor
> Fix For: Patch Needed
>
> Attachments: LANG-915.patch, LANG-915-test.patch
>
>
> The static method LocaleUtils.toLocale() fails, at least, to parse 3-char
> locale strings, which are completelly valid BCP47 locales.
--
This message was sent by Atlassian JIRA
(v6.1#6144)