commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <>
Subject [jira] [Commented] (LANG-915) Wrong locale handling in LocaleUtils.toLocale()
Date Sat, 11 Jan 2014 13:07:57 GMT


Benedikt Ritter commented on LANG-915:

Hello Sergio,

I've reviewed your patch. You're using tabs to intend your code. At commons we uses spaces
instead, since the representation of the tab character varies between different editors. I've
corrected this.

The new method {{StringUtils.occurences(String, String)}} seems to duplicate {{StringUtils.countMatches(CharSequence,
CharSequence)}}. I've removed it. Your new method caused {{StringUtilsTest.testStringUtilsCharSequenceContract()}}
to fail. It's always good to run {{mvn clean test}} before creating a patch, to be sure everything
still works.

All tests pass now. I've committed your patch in rev. 1557378.

Thanks for contributing!

> Wrong locale handling in LocaleUtils.toLocale()
> -----------------------------------------------
>                 Key: LANG-915
>                 URL:
>             Project: Commons Lang
>          Issue Type: Bug
>    Affects Versions: 3.1
>            Reporter: Sergio Fernández
>            Priority: Minor
>             Fix For: 3.3
>         Attachments: LANG-915-test.patch, LANG-915.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

View raw message