Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.
This isn't an issue per se (at least I don't think it is), but it has bitten us due to us accidentally relying on reference equality (== instead of equals):
The first line returns true because the cache kicks in and the instance is reused. However, in the latter, it appears that fromParts doesn't utilize the cache, and the comparison returns false.
Should this be fixed somehow, by having fromParts and friends also go through the cache?
This isn't an issue per se (at least I don't think it is), but it has bitten us due to us accidentally relying on reference equality (
==
instead ofequals
):The first line returns
true
because the cache kicks in and the instance is reused. However, in the latter, it appears thatfromParts
doesn't utilize the cache, and the comparison returnsfalse
.Should this be fixed somehow, by having
fromParts
and friends also go through the cache?