diff --git a/application/src/main/java/org/opentripplanner/model/plan/Itinerary.java b/application/src/main/java/org/opentripplanner/model/plan/Itinerary.java index c3d8513c2f1..18055690b6e 100644 --- a/application/src/main/java/org/opentripplanner/model/plan/Itinerary.java +++ b/application/src/main/java/org/opentripplanner/model/plan/Itinerary.java @@ -232,7 +232,7 @@ public void removeDeletionFlags(Set removeTags) { } public boolean isFlaggedForDeletion() { - return !getSystemNotices().isEmpty(); + return !systemNotices.isEmpty(); } /** diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainTest.java index 1cd19823f17..4ccb7ac9793 100644 --- a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainTest.java +++ b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainTest.java @@ -305,12 +305,12 @@ void testPostProcessorWithMaxItinerariesFilterSetToOneArriveBy() { @Nested class FlexSearchWindow { - private static final Itinerary FLEX = newItinerary(A, T11_00) + private final Itinerary flex = newItinerary(A, T11_00) .flex(T11_00, T11_30, B) .withIsSearchWindowAware(false) .build(); - private static final Instant EARLIEST_DEPARTURE = FLEX.startTime().plusMinutes(10).toInstant(); - private static final Duration SEARCH_WINDOW = Duration.ofHours(7); + private final Instant earliestDeparture = flex.startTime().plusMinutes(10).toInstant(); + private final Duration searchWindow = Duration.ofHours(7); /** * When the filtering of direct flex by the transit search window is deactivated, the direct @@ -320,18 +320,18 @@ class FlexSearchWindow { void keepDirectFlexWhenFilteringByEarliestDepartureIsDisabled() { ItineraryListFilterChain chain = createBuilder(true, false, 10) .withFilterDirectFlexBySearchWindow(false) - .withSearchWindow(EARLIEST_DEPARTURE, SEARCH_WINDOW) + .withSearchWindow(earliestDeparture, searchWindow) .build(); - assertEquals(toStr(List.of(FLEX)), toStr(chain.filter(List.of(FLEX)))); + assertEquals(toStr(List.of(flex)), toStr(chain.filter(List.of(flex)))); } @Test void removeDirectFlexWhenFilteringByEarliestDepartureIsEnabled() { ItineraryListFilterChain chain = createBuilder(true, false, 10) .withFilterDirectFlexBySearchWindow(true) - .withSearchWindow(EARLIEST_DEPARTURE, SEARCH_WINDOW) + .withSearchWindow(earliestDeparture, searchWindow) .build(); - assertEquals(toStr(List.of()), toStr(chain.filter(List.of(FLEX)))); + assertEquals(toStr(List.of()), toStr(chain.filter(List.of(flex)))); } }