Compare the original and the returned instance using ==
→ You'll notice that they don't equal because their Locations do not equal.
In this PR i override == and hashCode for Location, by assuming that two Locations are the same when their name is the same. I hope that this is sufficient, because additionally comparing transitionAt, transitionZone and zones would require using IterableEquality.equals which is not very performant.
I am happy to discuss any changes required to merge this thing asap.
Steps to reproduce the issue:
TZDateTime
instance==
→ You'll notice that they don't equal because their
Location
s do not equal.In this PR i override
==
andhashCode
forLocation
, by assuming that twoLocation
s are the same when theirname
is the same. I hope that this is sufficient, because additionally comparingtransitionAt
,transitionZone
andzones
would require usingIterableEquality.equals
which is not very performant.I am happy to discuss any changes required to merge this thing asap.