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

Steve Loughran commented on HDFS-8705:
--------------------------------------

we can't guarantee that holds across all JDK versions, it crops up 
intermittently : https://bugs.openjdk.java.net/browse/JDK-8041791

that's why I'd like to to be used with the case conversions: consistency.

the alternative is to leave as is and convert those demos to tests -but that 
won't catch the recurrent problem of the JDK used for release testing not being 
the same as people use in production (especially over time).

We now have one place for the operation: let's switch to it. Maybe add in the 
javadocs a link to this JIRA and some explanation of reasoning, "we can't trust 
JDKs"

> BlockStoragePolicySuite uses equalsIgnoreCase for name lookup, won't work in 
> all locales
> ----------------------------------------------------------------------------------------
>
>                 Key: HDFS-8705
>                 URL: https://issues.apache.org/jira/browse/HDFS-8705
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 2.8.0
>            Reporter: Steve Loughran
>            Assignee: Brahma Reddy Battula
>            Priority: Minor
>         Attachments: HDFS-8705-002.patch, HDFS-8705.patch
>
>
> Looking at {{BlockStoragePolicySuite.getPolicy(name)}}, is using 
> {{equalsIgnoreCase()}} to find a policy which matches a name.
> This will not work in all locales. It must use 
> {{toLowerCase(Locale.ENGLISH).equals(name)}}



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

Reply via email to