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
Refactor time related utility methods #2164
Refactor time related utility methods #2164
Conversation
…getRealClientIpAddr() and displayBytes()
Codecov Report
@@ Coverage Diff @@
## master #2164 +/- ##
============================================
+ Coverage 33.81% 33.91% +0.09%
- Complexity 2815 2819 +4
============================================
Files 421 421
Lines 29859 29784 -75
Branches 3780 3767 -13
============================================
+ Hits 10096 10100 +4
+ Misses 18863 18787 -76
+ Partials 900 897 -3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
PR #2113 exposed failures in tests of DefaultMailCreator class:
createErrorEmail, createFirstErrorMessage and createSuccessEmail
.Failures were related to an early initialization of a static SimpleDateFormat object inside the class. As a result of this, changes to the default timezone made later in the tests did not have an effect on that object.
This PR solves this issue by eliminating the use of non-immutable static fields in the utility method that formats dates. It also moves time related utility methods from across the project into a newly created TimeUtils class.