-
Notifications
You must be signed in to change notification settings - Fork 176
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
274: Moving Era Definitions to Data #2805
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2805 +/- ##
=========================================
Coverage 10.61% 10.61%
- Complexity 3870 3878 +8
=========================================
Files 717 719 +2
Lines 100256 100317 +61
Branches 16423 16423
=========================================
+ Hits 10639 10649 +10
- Misses 88229 88288 +59
+ Partials 1388 1380 -8
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.
One suggestion.
|
||
MekHQ.getLogger().error("Failed to determine a valid era for the date " + today); | ||
return getEras().values().stream().findFirst().orElse(new Era()); | ||
return getEras().ceilingEntry(today).getValue(); |
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.
I assume this works for dates past ilClan?
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.
ilClan doesn't have an end date, so it uses the default of 01-01-9999... which should handle any dates.
This fixes #274 by rewriting eras and moving them to file. They're barely used currently, but having a more robust and customizable system should help in the future.