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:56:15 UTC

[jira] Commented: (PIVOT-210) equals/hashCode fix for Span and Limits

    [ 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.