You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Nelson Carpentier (JIRA)" <ji...@apache.org> on 2007/02/07 05:53:05 UTC
[jira] Created: (LANG-316) Enable CaseInsensitivity in
EqualsBuilder and HashCodeBuilder
Enable CaseInsensitivity in EqualsBuilder and HashCodeBuilder
-------------------------------------------------------------
Key: LANG-316
URL: https://issues.apache.org/jira/browse/LANG-316
Project: Commons Lang
Issue Type: New Feature
Affects Versions: 2.3
Environment: Any
Reporter: Nelson Carpentier
Priority: Minor
Fix For: 2.3
Sometimes I want a String property containing "ThisString" to be seen as equal to "THISstring". EqualsBuilder (and HashCodeBuilder) should be enhanced to optionally handle this requirement.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (LANG-316) Enable CaseInsensitivity in
EqualsBuilder and HashCodeBuilder
Posted by "Nelson Carpentier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nelson Carpentier updated LANG-316:
-----------------------------------
Attachment: lang_20070206.diff
> Enable CaseInsensitivity in EqualsBuilder and HashCodeBuilder
> -------------------------------------------------------------
>
> Key: LANG-316
> URL: https://issues.apache.org/jira/browse/LANG-316
> Project: Commons Lang
> Issue Type: New Feature
> Affects Versions: 2.3
> Environment: Any
> Reporter: Nelson Carpentier
> Priority: Minor
> Fix For: 2.3
>
> Attachments: lang_20070206.diff
>
>
> Sometimes I want a String property containing "ThisString" to be seen as equal to "THISstring". EqualsBuilder (and HashCodeBuilder) should be enhanced to optionally handle this requirement.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Commented: (LANG-316) Enable CaseInsensitivity in
EqualsBuilder and HashCodeBuilder
Posted by "Stephen Kestle (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471170 ]
Stephen Kestle commented on LANG-316:
-------------------------------------
No - someone really should read up on Collators etc before jumping into this. equalsIgnoreCase is an English/ASCII hack, and does not scale well.
A solution should be append(Object lhs, Object rhs, Comparator c)
PS. passing booleans around is not very nice, and also becomes problematic...
> Enable CaseInsensitivity in EqualsBuilder and HashCodeBuilder
> -------------------------------------------------------------
>
> Key: LANG-316
> URL: https://issues.apache.org/jira/browse/LANG-316
> Project: Commons Lang
> Issue Type: New Feature
> Affects Versions: 2.3
> Environment: Any
> Reporter: Nelson Carpentier
> Priority: Minor
> Fix For: 3.0
>
> Attachments: lang_20070206.diff
>
>
> Sometimes I want a String property containing "ThisString" to be seen as equal to "THISstring". EqualsBuilder (and HashCodeBuilder) should be enhanced to optionally handle this requirement.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Commented: (LANG-316) Enable CaseInsensitivity in
EqualsBuilder and HashCodeBuilder
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489289 ]
Henri Yandell commented on LANG-316:
------------------------------------
Agreed on the booleans - change the method name; ie) appendIgnoreCase(String, String).
Unsure on Collators atm. The majority will just want ignoreCase, and I don't have the real world i18n experience to know whether collators are any good. If Sun reimplemented equalsIgnoreCase as a secondary strength default locale collator, would people be happy or would they complain?
When we say ignore case, do we mean secondary/tertiary, or is it a different semantic to the collating? ie) Do I have to know the Locale first to know whether I want to choose secondary or tertiary (or identical)?
> Enable CaseInsensitivity in EqualsBuilder and HashCodeBuilder
> -------------------------------------------------------------
>
> Key: LANG-316
> URL: https://issues.apache.org/jira/browse/LANG-316
> Project: Commons Lang
> Issue Type: New Feature
> Affects Versions: 2.3
> Environment: Any
> Reporter: Nelson Carpentier
> Priority: Minor
> Fix For: 3.0
>
> Attachments: lang_20070206.diff
>
>
> Sometimes I want a String property containing "ThisString" to be seen as equal to "THISstring". EqualsBuilder (and HashCodeBuilder) should be enhanced to optionally handle this requirement.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (LANG-316) Enable CaseInsensitivity in
EqualsBuilder and HashCodeBuilder
Posted by "Nelson Carpentier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nelson Carpentier updated LANG-316:
-----------------------------------
Attachment: lang_20070529.diff
Instead of the previous file, use this one to patch the changes.
I have added EqualsBuilder.appendIgnoreCase(String lhs, String rhs), and tests for that method.
I have added HashCodeBuilder.appendIgnoreCase(String string), and test for that method.
> Enable CaseInsensitivity in EqualsBuilder and HashCodeBuilder
> -------------------------------------------------------------
>
> Key: LANG-316
> URL: https://issues.apache.org/jira/browse/LANG-316
> Project: Commons Lang
> Issue Type: New Feature
> Affects Versions: 2.3
> Environment: Any
> Reporter: Nelson Carpentier
> Priority: Minor
> Fix For: 3.0
>
> Attachments: lang_20070206.diff, lang_20070529.diff
>
>
> Sometimes I want a String property containing "ThisString" to be seen as equal to "THISstring". EqualsBuilder (and HashCodeBuilder) should be enhanced to optionally handle this requirement.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (LANG-316) Enable CaseInsensitivity in
EqualsBuilder and HashCodeBuilder
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell updated LANG-316:
-------------------------------
Fix Version/s: (was: 2.3)
3.0
Makes sense to me. We have equalsIgnoreCase, so having that ability for EqualsBuilder (and therefore HashCodeBuilder) seems apt.
Setting fix version for 3.0 - ie) won't be looking at applying this until after 2.3 gets released.
> Enable CaseInsensitivity in EqualsBuilder and HashCodeBuilder
> -------------------------------------------------------------
>
> Key: LANG-316
> URL: https://issues.apache.org/jira/browse/LANG-316
> Project: Commons Lang
> Issue Type: New Feature
> Affects Versions: 2.3
> Environment: Any
> Reporter: Nelson Carpentier
> Priority: Minor
> Fix For: 3.0
>
> Attachments: lang_20070206.diff
>
>
> Sometimes I want a String property containing "ThisString" to be seen as equal to "THISstring". EqualsBuilder (and HashCodeBuilder) should be enhanced to optionally handle this requirement.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org