groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul King <>
Subject Re: groovy git commit: GROOVY-7876: ClassCastException when calling DefaultTypeTransformation#compareEqual (closes #368)
Date Mon, 25 Jul 2016 08:50:51 GMT
On Mon, Jul 25, 2016 at 5:05 PM, Jochen Theodorou <> wrote:
> On 24.07.2016 14:56, Paul King wrote:
>> I think the GString check can be moved up as you suggest to improve
>> the readability of the code without breaking existing behavior, so
>> I've done that.
>> Whether to go with your other suggestions is less clear to me.
>> If we assume the check in EqualsTest#testParentChildrenEquals remains
>> valid, i.e. we want symmetry of equals for java.util.Date and
>> java.sql.Time which compareTo gives us so long as we have both the
>> left<<right and right<<left isAssignable checks, then the current code
>> in master seems reasonable. And once we have the right<<left case, we
>> need the Object check as well for GROOVY-4046.
> If we do this only for java.util.Date and family, then we should probably
> special case it much like we do for GString

I should have said earlier, I don't think that is the current intended
behavior. I believe currently we try to allow for other Comparable
classes too. But we should make that explicit one way or the other.

Cheers, Paul.

View raw message