Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
This is a follow-up issue on GROOVY-4101 and GROOVY-4124. I think there was a misunderstanding back then. Basically this code
assert ([[1:2],[2:3]]-[["b":"a"]]) == [[1:2],[2:3]]
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