[jira] Created: (COLLECTIONS-294) Fix case-insensitive string handling

View: New views
6 Messages — Rating Filter:   Alert me  

[jira] Created: (COLLECTIONS-294) Fix case-insensitive string handling

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Fix case-insensitive string handling
------------------------------------

                 Key: COLLECTIONS-294
                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-294
             Project: Commons Collections
          Issue Type: Bug
          Components: Map
    Affects Versions: 3.2
            Reporter: Benjamin Bentmann
         Attachments: COLLECTIONS-294.patch

For example, the behavior of the {{CaseInsensitiveMap}} is 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.


[jira] Updated: (COLLECTIONS-294) Fix case-insensitive string handling

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/COLLECTIONS-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated COLLECTIONS-294:
------------------------------------------

    Attachment: COLLECTIONS-294.patch

> Fix case-insensitive string handling
> ------------------------------------
>
>                 Key: COLLECTIONS-294
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-294
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Map
>    Affects Versions: 3.2
>            Reporter: Benjamin Bentmann
>         Attachments: COLLECTIONS-294.patch
>
>
> For example, the behavior of the {{CaseInsensitiveMap}} is 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.


[jira] Commented: (COLLECTIONS-294) Fix case-insensitive string handling

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/COLLECTIONS-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595862#action_12595862 ]

Henri Yandell commented on COLLECTIONS-294:
-------------------------------------------

Definitely for the ExtendedProperties, it's obviously using English as a Locale.

I'm less convinced by CaseInsensitiveMap. Instead it seems that either:

a) It should have a Locale parameter to the constructor
b) It should be rewritten to be a CaseInsensitiveMap [ie: depend on equalsIgnoreCase], and not a ToLowerCaseMap as it currently is.

> Fix case-insensitive string handling
> ------------------------------------
>
>                 Key: COLLECTIONS-294
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-294
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Map
>    Affects Versions: 3.2
>            Reporter: Benjamin Bentmann
>         Attachments: COLLECTIONS-294.patch
>
>
> For example, the behavior of the {{CaseInsensitiveMap}} is 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.


[jira] Updated: (COLLECTIONS-294) Fix case-insensitive string handling

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/COLLECTIONS-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated COLLECTIONS-294:
------------------------------------------

    Attachment: COLLECTIONS-294-CaseInsensitiveMap.patch

Yes, you're right, the map thing is trickier than I realized. Attached is a new patch that makes key comparisons behave as {{equalsIgnoreCase()}} would do (watch out for the extended unit test that fails when using {{String.toLowerCase()}} in {{convertKey()}}).

A question that pops up is whether {{CaseInsensitiveMap}} should have been case-preserving for keys, i.e. store keys in their original case but compare case-insensitively. I mean, there seem to be two different use cases involved here:
# case-insentive key lookup, i.e. {{map.get("key") == map.get("KEY")}} but possibly {{map.keySet().contains("Key")}}
# automatic key normalization to lower/upper case to provide a specific key set view


> Fix case-insensitive string handling
> ------------------------------------
>
>                 Key: COLLECTIONS-294
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-294
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Map
>    Affects Versions: 3.2
>            Reporter: Benjamin Bentmann
>         Attachments: COLLECTIONS-294-CaseInsensitiveMap.patch, COLLECTIONS-294.patch
>
>
> For example, the behavior of the {{CaseInsensitiveMap}} is 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.


[jira] Updated: (COLLECTIONS-294) Fix case-insensitive string handling

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/COLLECTIONS-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell updated COLLECTIONS-294:
--------------------------------------

    Fix Version/s: 3.3

> Fix case-insensitive string handling
> ------------------------------------
>
>                 Key: COLLECTIONS-294
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-294
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Map
>    Affects Versions: 3.2
>            Reporter: Benjamin Bentmann
>             Fix For: 3.3
>
>         Attachments: COLLECTIONS-294-CaseInsensitiveMap.patch, COLLECTIONS-294.patch
>
>
> For example, the behavior of the {{CaseInsensitiveMap}} is 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.


[jira] Commented: (COLLECTIONS-294) Fix case-insensitive string handling

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/COLLECTIONS-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609451#action_12609451 ]

Henri Yandell commented on COLLECTIONS-294:
-------------------------------------------

Note: ExtendedProperties patch applied (r655204). I typo'd the key in the comment so it doesn't appear here.

> Fix case-insensitive string handling
> ------------------------------------
>
>                 Key: COLLECTIONS-294
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-294
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Map
>    Affects Versions: 3.2
>            Reporter: Benjamin Bentmann
>             Fix For: 3.3
>
>         Attachments: COLLECTIONS-294-CaseInsensitiveMap.patch, COLLECTIONS-294.patch
>
>
> For example, the behavior of the {{CaseInsensitiveMap}} is 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.