commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <j...@apache.org>
Subject [jira] Commented: (IO-167) Fix case-insensitive string handling
Date Sun, 25 May 2008 12:01:55 GMT

    [ https://issues.apache.org/jira/browse/IO-167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599677#action_12599677
] 

Benjamin Bentmann commented on IO-167:
--------------------------------------

bq. Might be an idea to add a comment to the patch explaining that this is necessary to agree
with String.equalsIgnoreCase().
I agree, these are the subtle things that are good to document. From the Javadoc of the method
(latest patch):
{code:java}
* <strong>Note:</strong> The return value of this method does not necessarily
match
* the return value from {@link String#toLowerCase()}. Instead, the return value is
* constructed to guarantee the following condition: <code>str1.equalsIgnoreCase(str2)</code>
* if and only if <code>convertCase(str1).equals(convertCase(str2))</code>.
{code}
You could move this down into this method body, if it helps to catch the eye.

bq. As to whether wildcardMatch() should be platform-dependent or independent, there are probably
use-cases for both.
To advocate for the platform-independence, this is the use case I have in mind: Consider an
open-source project with a world-wide operating dev community. Let's in particular assume
that some Turkish developers participate. Let's say this project has some license file hanging
around in their sources, named "LICENSE". This license should be picked up by some wildcard-based
pattern, e.g. "license". As the case of the file name is usually quite irrelevant for the
distro, people might want to do case-insensitive wildcard matching here. Now, for our Turkish
team-mates the file name match fails.

> Fix case-insensitive string handling
> ------------------------------------
>
>                 Key: IO-167
>                 URL: https://issues.apache.org/jira/browse/IO-167
>             Project: Commons IO
>          Issue Type: Bug
>    Affects Versions: 1.4
>            Reporter: Benjamin Bentmann
>         Attachments: IO-167-a.patch, IO-167.patch, IO-167.patch
>
>
> Case-insensitive operations are currently platform-dependent, please see [Common Bug
#3|http://www.nabble.com/Re%3A-Common-Bugs-p14931921s177.html] for details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message