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

Several optimizations in the method formatDurationWords #1018

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fenik17
Copy link
Contributor

@fenik17 fenik17 commented Jan 10, 2023

Several improvements in method DurationFormatUtils#formatDurationWords:

  • Removing a couple unreachable code paths.
  • Replacing replaceOnce to removeStart and removeEnd where it possible.
  • Saving information about removed parts to reduce scans of string.

@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2023

Codecov Report

Attention: Patch coverage is 90.32258% with 3 lines in your changes missing coverage. Please review.

Project coverage is 92.04%. Comparing base (ac2062d) to head (fbe2076).
Report is 1026 commits behind head on master.

Files with missing lines Patch % Lines
...apache/commons/lang3/time/DurationFormatUtils.java 90.32% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1018      +/-   ##
============================================
+ Coverage     92.03%   92.04%   +0.01%     
- Complexity     7429     7434       +5     
============================================
  Files           193      193              
  Lines         15672    15684      +12     
  Branches       2899     2904       +5     
============================================
+ Hits          14423    14436      +13     
+ Misses          676      675       -1     
  Partials        573      573              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants