Mail's implementations of equals and hashCode are incomplete #718
Labels
status: help wanted
requesting help from the community
type: community enhancement
feature request not on Twilio's roadmap
Issue Summary
The implementations of
Mail#equals
andMail#hashCode
are missing fields. Two instances will be considered equal despite having different values infrom
,to
,content
, etc. Having a distinct hash code is not a requirement, but could lead to poor performance in some cases.Steps to Reproduce
Mail
instance asm1
.Mail
instance as 'm2' with the same subject, but differentfrom
,to
, andcontent
.m1.equals(m2)
istrue
despite differing in most set fields.Code Snippet
Prints
Technical details:
The text was updated successfully, but these errors were encountered: