You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Niclas Hedhman (JIRA)" <ji...@apache.org> on 2009/08/06 11:54:14 UTC
[jira] Created: (PIVOT-210) equals/hashCode fix for Span and Limits
equals/hashCode fix for Span and Limits
---------------------------------------
Key: PIVOT-210
URL: https://issues.apache.org/jira/browse/PIVOT-210
Project: Pivot
Issue Type: Improvement
Reporter: Niclas Hedhman
The hashCode() for Span and Limits classes are not good.
Since min/start is often 0, the distribution of hashCode is very very poor, as all those will end up with 0 as the hashCode in previous samples.
Equals() allowed subclasses (typ a bad idea) and had no null protection.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (PIVOT-210) equals/hashCode fix for Span and
Limits
Posted by "Niclas Hedhman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739972#action_12739972 ]
Niclas Hedhman commented on PIVOT-210:
--------------------------------------
Attached a patch for this.
> equals/hashCode fix for Span and Limits
> ---------------------------------------
>
> Key: PIVOT-210
> URL: https://issues.apache.org/jira/browse/PIVOT-210
> Project: Pivot
> Issue Type: Improvement
> Reporter: Niclas Hedhman
> Attachments: hashCodeEquals_Patch.patch
>
>
> The hashCode() for Span and Limits classes are not good.
> Since min/start is often 0, the distribution of hashCode is very very poor, as all those will end up with 0 as the hashCode in previous samples.
> Equals() allowed subclasses (typ a bad idea) and had no null protection.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIVOT-210) equals/hashCode fix for Span and Limits
Posted by "Niclas Hedhman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niclas Hedhman updated PIVOT-210:
---------------------------------
Attachment: hashCodeEquals_Patch.patch
> equals/hashCode fix for Span and Limits
> ---------------------------------------
>
> Key: PIVOT-210
> URL: https://issues.apache.org/jira/browse/PIVOT-210
> Project: Pivot
> Issue Type: Improvement
> Reporter: Niclas Hedhman
> Attachments: hashCodeEquals_Patch.patch
>
>
> The hashCode() for Span and Limits classes are not good.
> Since min/start is often 0, the distribution of hashCode is very very poor, as all those will end up with 0 as the hashCode in previous samples.
> Equals() allowed subclasses (typ a bad idea) and had no null protection.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (PIVOT-210) equals/hashCode fix for Span and
Limits
Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Greg Brown resolved PIVOT-210.
------------------------------
Resolution: Fixed
Fix Version/s: 1.3
Assignee: Greg Brown
I applied the hashCode() updates. The equals() changes were not necessary, since these classes are final and can't have subclasses.
> equals/hashCode fix for Span and Limits
> ---------------------------------------
>
> Key: PIVOT-210
> URL: https://issues.apache.org/jira/browse/PIVOT-210
> Project: Pivot
> Issue Type: Improvement
> Reporter: Niclas Hedhman
> Assignee: Greg Brown
> Fix For: 1.3
>
> Attachments: hashCodeEquals_Patch.patch
>
>
> The hashCode() for Span and Limits classes are not good.
> Since min/start is often 0, the distribution of hashCode is very very poor, as all those will end up with 0 as the hashCode in previous samples.
> Equals() allowed subclasses (typ a bad idea) and had no null protection.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.