Commits
Andreas Simon authored and Alexandre Chatiron committed 919352eb5a9
[#1319] Refactored the building of mock mails for better readability and maintainability
[#1319] Some small refactorings of Mail.send
[#1319] Extracted play.libs.mail.MailSystem concept from play.libs.Mail
[#1319] Use polymorphism of abstract MailSystem; determine concrete MailSystem implementation through factory method
[#1319] Extracted MailSystemFactory from play.libs.Mail
[#1319] Refactored play.libs.mail.DefaultMailSystemFactory
[#1319] Transformed the MailSystemFactory from anonymous instantiation to a class attribute
[#1319] Reduced the visibility of mail lib classes to encapsulate implementations in the play.libs.mail package
[#1319] "Improved the testability of mail sending" through implementation of substitution mechanisms for MailSystems
[#1319] Replaced the static *class* Mail.Mock through static *object* Mail.Mock
After recompiling applications built upon previous versions, there are no problems.
From a *plain* source code perspective, the caller syntax has not changed at all.
[#1319] Made as many methods in Mail.LegacyMockMailSystem non-static as possible
WARNING: Test suites just-test-cases, i-am-a-developer and yabe failed sometimes.
Results were NOT RELIABLY REPRODUCIBLE.
[#1319] Extracted inner class play.libs.Mail.LegacyMockMailSystem to play.libs.mail.test.LegacyMockMailSystem
[#1319] Moved play.libs.ImmediateFuture to play.util package
ImmediateFuture is not specific to Play libraries. It is more like a
generic utility that can be used in all concurrent environments.
Conflicts:
framework/src/play/libs/Mail.java