Skip to content

Commit fd6c9bb

Browse files
committed
use naming fallbackToPlannedTimetableOnNoServiceDate
1 parent 26abec4 commit fd6c9bb

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public Optional<List<TripTimeOnDate>> getScheduledTripTimes(Trip trip) {
123123
public Optional<List<TripTimeOnDate>> getTripTimeOnDates(
124124
Trip trip,
125125
LocalDate serviceDate,
126-
boolean fallbackToPlannedTimetableOnNonRunningDate
126+
boolean fallbackToPlannedTimetableOnNoServiceDate
127127
) {
128128
TripPattern pattern = findPattern(trip, serviceDate);
129129

@@ -134,7 +134,7 @@ public Optional<List<TripTimeOnDate>> getTripTimeOnDates(
134134
if (times == null) {
135135
return Optional.empty();
136136
} else if (!this.getServiceCodesRunningForDate(serviceDate).contains(times.getServiceCode())) {
137-
if (fallbackToPlannedTimetableOnNonRunningDate) {
137+
if (fallbackToPlannedTimetableOnNoServiceDate) {
138138
// Technically not returning empty here is incorrect, you should use getScheduledTripTimes
139139
// above instead if you want this, but it has been the behavior for a very long time, and
140140
// at least one longstanding front end will fail without this.

application/src/main/java/org/opentripplanner/transit/service/TransitService.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,13 @@ public interface TransitService {
7575

7676
/**
7777
* @return if the trip doesn't run on the specified service date, return scheduled trip times,
78-
* unmodified by any realtime data, if
79-
* fallbackToNextScheduledDate is true, empty otherwise. Logically this is confusing, but
80-
* existing API users depend on this.
78+
* unmodified by any realtime data, if fallbackToPlannedTimetableOnNoServiceDate is true, empty
79+
* otherwise. Logically this is confusing, but existing API users depend on this.
8180
*/
8281
Optional<List<TripTimeOnDate>> getTripTimeOnDates(
8382
Trip trip,
8483
LocalDate serviceDate,
85-
boolean fallbackToPlannedTimetableOnNonRunningDate
84+
boolean fallbackToPlannedTimetableOnNoServiceDate
8685
);
8786

8887
/**

application/src/test/java/org/opentripplanner/transit/service/DefaultTransitServiceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ void getRealtimeTripTimes() {
242242
}
243243

244244
@Test
245-
void getTripTimeOnDateWithNoServiceAndFallbackToNextScheduledDate() {
245+
void getTripTimeOnDateWithNoServiceAndFallbackToPlannedTimetable() {
246246
assertEquals(
247247
Optional.of(
248248
List.of(

0 commit comments

Comments
 (0)