From e5355d36e68731fa2d9c4a8e83d9f54b8cd02443 Mon Sep 17 00:00:00 2001 From: Robin Beer Date: Fri, 27 Oct 2023 10:53:43 +0100 Subject: [PATCH] refactor(Addressed PR feedback): Added an additional transfer minus optional fields --- src/main/java/com/conveyal/gtfs/model/Transfer.java | 8 ++------ src/test/resources/fake-agency/transfers.txt | 3 ++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/conveyal/gtfs/model/Transfer.java b/src/main/java/com/conveyal/gtfs/model/Transfer.java index 8ddfa1989..187469a91 100644 --- a/src/main/java/com/conveyal/gtfs/model/Transfer.java +++ b/src/main/java/com/conveyal/gtfs/model/Transfer.java @@ -74,10 +74,7 @@ public void loadOneRow() throws IOException { getRefField("to_trip_id", false, feed.trips); tr.feed = feed; - feed.transfers.put( - createId(tr.from_stop_id, tr.to_stop_id, tr.from_trip_id, tr.to_trip_id, tr.from_route_id, tr.to_route_id), - tr - ); + feed.transfers.put(tr.getId(), tr); } } @@ -133,5 +130,4 @@ private static String createId( ) { return String.format("%s_%s_%s_%s_%s_%s", fromStopId, toStopId, fromTripId, toTripId, fromRouteId, toRouteId); } - -} +} \ No newline at end of file diff --git a/src/test/resources/fake-agency/transfers.txt b/src/test/resources/fake-agency/transfers.txt index 271fb7193..1296dea84 100755 --- a/src/test/resources/fake-agency/transfers.txt +++ b/src/test/resources/fake-agency/transfers.txt @@ -1,2 +1,3 @@ from_stop_id,to_stop_id,from_trip_id,to_trip_id,from_route_id,to_route_id,transfer_type,min_transfer_time -4u6g,johv,a30277f8-e50a-4a85-9141-b1e0da9d429d,frequency-trip,1,1,1,60 \ No newline at end of file +4u6g,johv,a30277f8-e50a-4a85-9141-b1e0da9d429d,frequency-trip,1,1,1,60 +4u6g,123,,,,,1,60 \ No newline at end of file