Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
generalizedCostMaxLimit
field to thePageCursor
to enable usingRemoveTransitIfStreetOnlyIsBetter
filter with paging #6474New 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
base: dev-2.x
Are you sure you want to change the base?
Add
generalizedCostMaxLimit
field to thePageCursor
to enable usingRemoveTransitIfStreetOnlyIsBetter
filter with paging #6474Changes from 8 commits
316db17
4391ac3
cd6a152
2324f68
5b1e251
77c3cfc
9af6665
7c84581
ba3a817
97a4749
e59b70a
45a7c43
7cabb40
b66e83f
e7b641f
833acec
56009b7
d46147f
6f42043
a4b6b3f
433de9f
cd40ff6
67a86c1
fbcd0f4
de777a3
81f5e89
556a8f3
da84174
10735b1
1056e88
475e6e7
63723fe
4663c03
6c15475
49eb97b
2b7b7e4
53c8e0f
643f69c
61a3e55
73d96c1
bfab7ce
b2a541e
3e99206
d8219ec
1df39de
92c68fc
58fedb9
a3801e2
cf9dde8
d830c17
545baa2
12f389b
ce4b25d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 don't completely understand these changes. In what scenario is
numItinerariesFilterResults
null and why iswholeSwUsed
set as false only ifnumItinerariesFilterResults
is not null?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.
numItinerariesFilterResults() can be null if no itineraries were removed, I added a comment
OpenTripPlanner/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/NumItinerariesFilter.java
Line 46 in c1626ff
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.
the above comment also requires looking at the whole context of the filter
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.
You may rename
wholeSwUsed
towholeSearchWindowUsed
, but it it is the case that the state of thewholeSearchWindowUsed
can be derived fromis pageCursorInput.numItinerariesFilterResults() == null
, replacing it with a method is maybe better.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 changed
wholeSwUsed
towholeSearchWindowUsed
, but did not create a methodThere 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 think this is also by default true. Usually we try to keep false as the default value. Also, the toString method uses a different name for this, perhaps we should use that for either the variable name or as the method name as @t2gran suggested.