[
https://issues.apache.org/jira/browse/HADOOP-11602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14328653#comment-14328653
]
Akira AJISAKA commented on HADOOP-11602:
----------------------------------------
{code:title=TestDFSIO.java}
- } else if (args[i].equalsIgnoreCase("-truncate")) {
+ } else if (args[i].equals("-truncate")) {
{code}
I suppose it would be intentional to use {{equalsIgnoreCase}}.
{code:title=CLI.java}
- TaskReport[] reports = job.getTaskReports(TaskType.valueOf(type.toUpperCase
+ TaskReport[] reports =
+ job.getTaskReports(TaskType.valueOf(type.toUpperCase(Locale.ENGLISH)));
{code}
Would you fix as the same as trunk? The diff will make a (small) conflict
between trunk and branch-2.
I found {{FSOperations#execute}} should be fixed also. The code exists in
trunk, too. Having brought by HDFS-7656 after the trunk patch was committed.
I'm thinking we should fix them in a separate jira after branch-2 patch is
committed.
> 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)