Skip to content

Commit ad9c6d2

Browse files
committed
Clean up
1 parent c65300e commit ad9c6d2

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

reader-gtfs/src/main/java/com/conveyal/gtfs/GTFSFeed.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ public void close () {
330330
}
331331

332332
/** Thrown when we cannot interpolate stop times because the first or last stops do not have times */
333-
public class FirstAndLastStopsDoNotHaveTimes extends Exception {
333+
public class FirstAndLastStopsDoNotHaveTimes extends RuntimeException {
334334
/** do nothing */
335335
}
336336

reader-gtfs/src/main/java/com/graphhopper/reader/gtfs/GtfsReader.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private void buildPtNetwork() {
147147
}
148148
}
149149
ArrayList<StopTime> stopTimes = new ArrayList<>();
150-
getInterpolatedStopTimesForTrip(trip.trip_id).forEach(stopTimes::add);
150+
feed.getInterpolatedStopTimesForTrip(trip.trip_id).forEach(stopTimes::add);
151151
return new TripWithStopTimes(trip, stopTimes, validOnDay, Collections.emptySet(), Collections.emptySet());
152152
})
153153
.sorted(Comparator.comparingInt(trip -> trip.stopTimes.iterator().next().departure_time))
@@ -629,14 +629,6 @@ private void insertInboundBlockTransfers(List<TripWithStopTimeAndArrivalNode> ar
629629
}
630630
}
631631

632-
private Iterable<StopTime> getInterpolatedStopTimesForTrip(String trip_id) {
633-
try {
634-
return feed.getInterpolatedStopTimesForTrip(trip_id);
635-
} catch (GTFSFeed.FirstAndLastStopsDoNotHaveTimes e) {
636-
throw new RuntimeException(e);
637-
}
638-
}
639-
640632
private void insertInboundTransfers(String fromStopId, String from_route_id, int minimumTransferTime, NavigableMap<Integer, Integer> toStopTimelineNode) {
641633
int stationNode = gtfsStorage.getStationNodes().get(fromStopId);
642634
EdgeIterator i = graph.createEdgeExplorer().setBaseNode(stationNode);

0 commit comments

Comments
 (0)