Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimpleMailMessage's handling of to/cc/bcc arrays is inconsistent [SPR-16671] #21212

Closed
spring-projects-issues opened this issue Mar 29, 2018 · 0 comments
Assignees
Labels
status: backported type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Mar 29, 2018

Juergen Hoeller opened SPR-16671 and commented

SimpleMailMessage has some pretty old inconsistent handling of its to, cc and bcc arrays: copying them in the copy constructor but passing the original (mutable) arrays on in copyTo(MailMessage), and wrongly checking the array elements for null in the hashCode implementation. Let's finally streamline those in 5.0.5 and 4.3.15 towards consistent array copying and consistent use of ObjectUtils.nullSafeHashCode.

Last but not least, SimpleMailMessage.hashCode() should not include text which is the most expensive to calculate and very unlikely to change if all other fields are the same anyway.


Affects: 4.3.14, 5.0.4

Referenced from: commits 4cf1795, 1cc513d

Backported to: 4.3.15

@spring-projects-issues spring-projects-issues added type: bug status: backported labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.0.5 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backported type: bug
Projects
None yet
Development

No branches or pull requests

2 participants