File tree Expand file tree Collapse file tree
application/src/main/java/org/opentripplanner/model/plan/paging/cursor Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org .opentripplanner .model .plan .paging .cursor ;
22
3+ import java .time .Duration ;
4+
35public class PageCursorConstants {
46
57 /**
@@ -9,5 +11,5 @@ public class PageCursorConstants {
911 * <p>
1012 * The value is set to 60 seconds because raptor operates in one minute increments.
1113 */
12- public static final int SEARCH_WINDOW_END_EXCLUSIVITY_TIME_ADDITION_SECONDS = 60 ;
14+ public static final Duration SEARCH_WINDOW_END_EXCLUSIVITY_TIME_ADDITION = Duration . ofSeconds ( 60 ) ;
1315}
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ private void createPageCursors() {
140140 prevEdt = pageCursorInput
141141 .latestRemovedDeparture ()
142142 .minus (newSearchWindow )
143- .plusSeconds (PageCursorConstants .SEARCH_WINDOW_END_EXCLUSIVITY_TIME_ADDITION_SECONDS );
143+ .plus (PageCursorConstants .SEARCH_WINDOW_END_EXCLUSIVITY_TIME_ADDITION );
144144 nextEdt = edtAfterUsedSw ();
145145 }
146146 }
@@ -173,8 +173,8 @@ private Instant edtBeforeNewSw() {
173173 private Instant edtAfterUsedSw () {
174174 Instant defaultEdt = currentEdt .plus (currentSearchWindow );
175175 if (firstSearchLatestItineraryDeparture != null ) {
176- Instant edtFromLatestItineraryDeparture = firstSearchLatestItineraryDeparture .plusSeconds (
177- PageCursorConstants .SEARCH_WINDOW_END_EXCLUSIVITY_TIME_ADDITION_SECONDS
176+ Instant edtFromLatestItineraryDeparture = firstSearchLatestItineraryDeparture .plus (
177+ PageCursorConstants .SEARCH_WINDOW_END_EXCLUSIVITY_TIME_ADDITION
178178 );
179179 if (edtFromLatestItineraryDeparture .isBefore (defaultEdt )) {
180180 return edtFromLatestItineraryDeparture ;
You can’t perform that action at this time.
0 commit comments