commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-941) Test failure in LocaleUtilsTest when building with JDK 8
Date Fri, 03 Jan 2014 10:19:53 GMT

    [ https://issues.apache.org/jira/browse/LANG-941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13861394#comment-13861394
] 

Benedikt Ritter commented on LANG-941:
--------------------------------------

I've added some code that creates an empty locale if an empty string is passed in. Since the
empty locale seems to be part of the available locales in JDK8, this seems reasonable. I've
tested with:

{code}
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b116)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b58, mixed mode)
{code}

{code}
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
{code}

{code}
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
{code}

> Test failure in LocaleUtilsTest when building with JDK 8
> --------------------------------------------------------
>
>                 Key: LANG-941
>                 URL: https://issues.apache.org/jira/browse/LANG-941
>             Project: Commons Lang
>          Issue Type: Sub-task
>          Components: lang.*
>    Affects Versions: 3.2
>         Environment: JDK 8
>            Reporter: Benedikt Ritter
>            Assignee: Benedikt Ritter
>             Fix For: 3.2.1
>
>
> Test failure in {{testParseAllLocales}}:
> {code}
> -------------------------------------------------------------------------------
> Test set: org.apache.commons.lang3.LocaleUtilsTest
> -------------------------------------------------------------------------------
> Tests run: 14, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.067 sec <<<
FAILURE! - in org.apache.commons.lang3.LocaleUtilsTest
> testParseAllLocales(org.apache.commons.lang3.LocaleUtilsTest)  Time elapsed: 0.015 sec
 <<< ERROR!
> java.lang.IllegalArgumentException: Invalid locale format: 
> 	at org.apache.commons.lang3.LocaleUtils.toLocale(LocaleUtils.java:98)
> 	at org.apache.commons.lang3.LocaleUtilsTest.testParseAllLocales(LocaleUtilsTest.java:569)
> {code}
> The string passed to {{LocaleUtils.toLocale(String)}} appears to be empty.
> Environment is:
> {code}
> Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 17:22:22+0200)
> Maven home: /usr/local/Cellar/maven/3.1.1/libexec
> Java version: 1.8.0-ea, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre
> Default locale: de_DE, platform encoding: UTF-8
> OS name: "mac os x", version: "10.9.1", arch: "x86_64", family: "mac"
> java version "1.8.0-ea"
> Java(TM) SE Runtime Environment (build 1.8.0-ea-b116)
> Java HotSpot(TM) 64-Bit Server VM (build 25.0-b58, mixed mode)
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message