Skip to content

Commit

Permalink
Merge pull request #360 from HSLdevcom/DT-4113
Browse files Browse the repository at this point in the history
DT-4113 OTP cancel certain departures in Oulu
  • Loading branch information
vesameskanen authored Jun 14, 2021
2 parents 9fa30a0 + 1886299 commit 8cef2dc
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions src/main/java/org/opentripplanner/routing/edgetype/Timetable.java
Original file line number Diff line number Diff line change
Expand Up @@ -615,14 +615,10 @@ public TripTimes createUpdatedTripTimes(TripUpdate tripUpdate, TimeZone timeZone
LOG.error("Arrival time at index {} is erroneous.", i);
return null;
}
} else {
if (delay == null) {
newTimes.cancelArrivalTime(i);
} else {
newTimes.updateArrivalDelay(i, delay);
if (newTimes.isCanceledArrival(i)) {
newTimes.unCancelArrivalTime(i);
}
} else if (delay != null) {
newTimes.updateArrivalDelay(i, delay);
if (newTimes.isCanceledArrival(i)) {
newTimes.unCancelArrivalTime(i);
}
}

Expand All @@ -645,14 +641,10 @@ public TripTimes createUpdatedTripTimes(TripUpdate tripUpdate, TimeZone timeZone
LOG.error("Departure time at index {} is erroneous.", i);
return null;
}
} else {
if (delay == null) {
newTimes.cancelDepartureTime(i);
} else {
newTimes.updateDepartureDelay(i, delay);
if (newTimes.isCanceledDeparture(i)) {
newTimes.unCancelDepartureTime(i);
}
} else if (delay != null) {
newTimes.updateDepartureDelay(i, delay);
if (newTimes.isCanceledDeparture(i)) {
newTimes.unCancelDepartureTime(i);
}
}
}
Expand Down

0 comments on commit 8cef2dc

Please sign in to comment.