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

Harsh J commented on HDFS-4623:
-------------------------------

{code}
-                clusterId.equalsIgnoreCase(StartupOption.FORCE.getName()) ||
-                clusterId.equalsIgnoreCase(
-                    StartupOption.NONINTERACTIVE.getName())) {
+                clusterId.equals(StartupOption.FORCE.getName()) ||
+                clusterId.equals(StartupOption.NONINTERACTIVE.getName())) {
{code}

Would this be a proper new way of comparison? Cause the former way would 
disable case checks for both objects if I'm right, while here we're 
transforming the clusterId to lower but aren't explicitly doing the same for 
the StartupOption (maybe implicitly relying on it instead perhaps)?

Looks good other than this.
                
> NameNode.parseArguments() should use EN as the locale for case checks of 
> arguments
> ----------------------------------------------------------------------------------
>
>                 Key: HDFS-4623
>                 URL: https://issues.apache.org/jira/browse/HDFS-4623
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 2.0.3-alpha
>            Reporter: Steve Loughran
>            Priority: Trivial
>         Attachments: HDFS-4623.patch
>
>
> {{NameNode.parseArguments()}} uses {{equalsIgnoreCase()}} to case convert 
> arguments on the command line. This will not work consistently across 
> locales, especially those that don't have {{"I".toLower()=="i").
> Fix is trivial.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to