You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementations of Mail#equals and Mail#hashCode are missing fields. Two instances will be considered equal despite having different values in from, to, content, etc. Having a distinct hash code is not a requirement, but could lead to poor performance in some cases.
Steps to Reproduce
Create a first Mail instance as m1.
Create a second Mail instance as 'm2' with the same subject, but different from, to, and content.
Find that m1.equals(m2) is true despite differing in most set fields.
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: