hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akira AJISAKA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11602) Fix toUpperCase/toLowerCase to use Locale.ENGLISH
Date Fri, 20 Feb 2015 06:47:12 GMT

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

Akira AJISAKA commented on HADOOP-11602:
----------------------------------------

bq. This means that we could called setDefault() anywhere we start the services: NameNode,
DataNode, Balancer, etc., or clients FileSystem, or other tools ToolRunner. I did not test
it, but seems to be feasible.
This change seems to be incompatible for user applications. Users might have applications
that rely on the services' default locale. (Apparently it's a bad practice, however, I've
ever seen that.)

bq. I would still try to do it via a utility methods
If we use the utility method, hundreds of line change is still needed.

I'll check the patch for branch-2.

> Fix toUpperCase/toLowerCase to use Locale.ENGLISH
> -------------------------------------------------
>
>                 Key: HADOOP-11602
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11602
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.6.0
>            Reporter: Tsuyoshi OZAWA
>            Assignee: Tsuyoshi OZAWA
>         Attachments: HADOOP-11602-001.patch, HADOOP-11602-002.patch, HADOOP-11602-branch-2.001.patch
>
>
> String#toLowerCase()/toUpperCase() without a locale argument can occur unexpected behavior
based on the locale. It's written in [Javadoc|http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#toLowerCase()]:
> {quote}
> For instance, "TITLE".toLowerCase() in a Turkish locale returns "t\u0131tle", where '\u0131'
is the LATIN SMALL LETTER DOTLESS I character
> {quote}
> This issue is derived from HADOOP-10101.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message