You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Emmanuel Bourg (JIRA)" <ji...@apache.org> on 2007/04/17 01:12:15 UTC
[jira] Created: (LANG-328) LocaleUtils.toLocale() rejects strings
with only language+variant
LocaleUtils.toLocale() rejects strings with only language+variant
-----------------------------------------------------------------
Key: LANG-328
URL: https://issues.apache.org/jira/browse/LANG-328
Project: Commons Lang
Issue Type: Bug
Affects Versions: 2.3
Reporter: Emmanuel Bourg
LocaleUtils.toLocale() throws an exception on strings containing a language and a variant but no country code. For example : fr__POSIX
This string can be produced with the JDK by instanciating a Locale with an empty string for the country : new Locale("fr", "", "POSIX").toString(). According to the javadoc for the Locale class a variant is allowed with just a language code or just a country code.
Commons Configuration handles this case in its PropertyConverter.toLocale() method. I'd like to replace our implementation by the one provided by LocaleUtils, but our tests fail due to this case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Resolved: (LANG-328) LocaleUtils.toLocale() rejects strings
with only language+variant
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell resolved LANG-328.
--------------------------------
Resolution: Fixed
svn ci -m "Applying unit test/fix for LANG-328"
Sending src/java/org/apache/commons/lang/LocaleUtils.java
Sending src/test/org/apache/commons/lang/LocaleUtilsTest.java
Transmitting file data ..
Committed revision 534277.
> LocaleUtils.toLocale() rejects strings with only language+variant
> -----------------------------------------------------------------
>
> Key: LANG-328
> URL: https://issues.apache.org/jira/browse/LANG-328
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 2.3
> Reporter: Emmanuel Bourg
> Fix For: 2.3.1
>
> Attachments: LANG-328.patch
>
>
> LocaleUtils.toLocale() throws an exception on strings containing a language and a variant but no country code. For example : fr__POSIX
> This string can be produced with the JDK by instanciating a Locale with an empty string for the country : new Locale("fr", "", "POSIX").toString(). According to the javadoc for the Locale class a variant is allowed with just a language code or just a country code.
> Commons Configuration handles this case in its PropertyConverter.toLocale() method. I'd like to replace our implementation by the one provided by LocaleUtils, but our tests fail due to this case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (LANG-328) LocaleUtils.toLocale() rejects strings
with only language+variant
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell updated LANG-328:
-------------------------------
Attachment: LANG-328.patch
Attaching a unit test/fix patch for this.
> LocaleUtils.toLocale() rejects strings with only language+variant
> -----------------------------------------------------------------
>
> Key: LANG-328
> URL: https://issues.apache.org/jira/browse/LANG-328
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 2.3
> Reporter: Emmanuel Bourg
> Fix For: 2.3.1
>
> Attachments: LANG-328.patch
>
>
> LocaleUtils.toLocale() throws an exception on strings containing a language and a variant but no country code. For example : fr__POSIX
> This string can be produced with the JDK by instanciating a Locale with an empty string for the country : new Locale("fr", "", "POSIX").toString(). According to the javadoc for the Locale class a variant is allowed with just a language code or just a country code.
> Commons Configuration handles this case in its PropertyConverter.toLocale() method. I'd like to replace our implementation by the one provided by LocaleUtils, but our tests fail due to this case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (LANG-328) LocaleUtils.toLocale() rejects strings
with only language+variant
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell updated LANG-328:
-------------------------------
Fix Version/s: 2.3.1
Fix asap issue; so marking for 2.3.1.
> LocaleUtils.toLocale() rejects strings with only language+variant
> -----------------------------------------------------------------
>
> Key: LANG-328
> URL: https://issues.apache.org/jira/browse/LANG-328
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 2.3
> Reporter: Emmanuel Bourg
> Fix For: 2.3.1
>
>
> LocaleUtils.toLocale() throws an exception on strings containing a language and a variant but no country code. For example : fr__POSIX
> This string can be produced with the JDK by instanciating a Locale with an empty string for the country : new Locale("fr", "", "POSIX").toString(). According to the javadoc for the Locale class a variant is allowed with just a language code or just a country code.
> Commons Configuration handles this case in its PropertyConverter.toLocale() method. I'd like to replace our implementation by the one provided by LocaleUtils, but our tests fail due to this case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org