-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Timetable snapshot code cleanup #6124
Timetable snapshot code cleanup #6124
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6124 +/- ##
=============================================
- Coverage 69.85% 69.85% -0.01%
+ Complexity 17497 17492 -5
=============================================
Files 1976 1976
Lines 74710 74706 -4
Branches 7645 7645
=============================================
- Hits 52191 52187 -4
Misses 19868 19868
Partials 2651 2651 ☔ View full report in Codecov by Sentry. |
cb53d81
to
f91acf8
Compare
9681194
to
466c4a9
Compare
466c4a9
to
b451cbb
Compare
* TODO RT_AB: clarify if this is an index or the original source of truth. | ||
*/ | ||
private final Map<TripIdAndServiceDate, TripPattern> realtimeAddedTripPattern; | ||
private final Map<TripIdAndServiceDate, TripPattern> realTimeModifiedTripPattern; |
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.
My suggestion is to call this realTimeNewTripPatternsForModifiedTrips
. It is long and ugly but at least it is very specific and shouldn't cause any confusion. We can rename it to something simpler later after we've cleaned up the code.
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.
Done
70a7ba3
to
3659670
Compare
@@ -604,6 +600,12 @@ private void swapTimetable(TripPattern pattern, Timetable original, Timetable up | |||
dirty = true; | |||
} | |||
|
|||
private void validateReadOnly() { |
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 would call this validateNotReadOnly()
or validateWritable()
or throwIfReadOnly()
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.
Done
eee401f
to
28fc2e4
Compare
28fc2e4
to
6113d1d
Compare
Summary
Code clean-up and documentation/clarification in TimetableSnapshot:
Issue
#6048
Unit tests
No
Documentation
No