You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Lari Hotari (JIRA)" <ji...@apache.org> on 2015/09/24 22:24:05 UTC

[jira] [Commented] (GROOVY-7267) avoid hashcode based equality check without equals

    [ https://issues.apache.org/jira/browse/GROOVY-7267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14906940#comment-14906940 ] 

Lari Hotari commented on GROOVY-7267:
-------------------------------------

this change might have caused GROOVY-7602

> avoid hashcode based equality check without equals
> --------------------------------------------------
>
>                 Key: GROOVY-7267
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7267
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-jdk
>            Reporter: Jochen Theodorou
>            Assignee: Jochen Theodorou
>             Fix For: 2.3.10, 2.4.1
>
>
> This is a follow-up issue on GROOVY-4101  and GROOVY-4124. I think there was a misunderstanding back then. Basically this code{code:Java}assert ([[1:2],[2:3]]-[["b":"a"]]) == [[1:2],[2:3]]{code} can fail, because of the path that is taken with NumberAwareComperator. The hashcodes of the minus element first list entry and the hashcode of the source list first element are equal. Since they are both lists DefaultTypeTransformation.compareTo will fail and the hashcode equality is then used to decide that [1:2] is to be removed. This makes not really sense, thus the issue is for the removal of the equality case



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)