mail-api
mail-api copied to clipboard
move from MailDateFormat (not thread safe) to DateTimeFormatter
With high load and usage of MimeMessage plenty of locks due to MailDateFormat. Maybe it is time move to something thread safe like DateTimeFormatter?
MailDateFormatter has lots of exceptions for parsing that make the move to DateTimeFormatter not viable.
I think the best fix here is to remove the lock and static field. Then have each call create a method local instance.
Thoughts @anthonyvdotbe?
@jmehrens yes, I agree that your proposal is the best option here