Stream: implementers
Topic: Java FHIR lib: equals & hashcode
Patrick Werner (Apr 25 2021 at 13:20):
I just tried to use stream().distinct() on a list of OperationOutcomeIssueComponents, which failed. Reason for this is, that equals & hashcode() aren't overwritten by the FHIR java model classes.
I'm now using the equalsDeep() method, which works fine, but i miss the streaming convenience.
Could the java Model code generator be altered to override these two methods? Easiest would be to just call equalsDeep method from equals().
Lloyd McKenzie (Apr 25 2021 at 16:05):
You could raise this as a pull request against the HAPI project.
Grahame Grieve (Apr 27 2021 at 01:49):
dsicussion on #hapi . I think there are several issues here which is why I've kept away from it
Grahame Grieve (Apr 27 2021 at 20:50):
I just discussed this with @James Agnew and @Mark Iantorno. There's obvious performance implications, but we're inclined to make this change. @Patrick Werner please check on the #hapi stream to see if anyone objects
Mark Iantorno (Apr 27 2021 at 20:51):
Please also tag me in that stream
Last updated: Apr 12 2022 at 19:14 UTC