From 2805225c0da8f3b8bcdff94afc23ddbdb88b7bb7 Mon Sep 17 00:00:00 2001 From: ansons Date: Fri, 10 Nov 2023 23:15:02 -0500 Subject: [PATCH] Handle multiple feeds when saving fares --- src/main/java/com/conveyal/r5/transit/TransitLayer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/conveyal/r5/transit/TransitLayer.java b/src/main/java/com/conveyal/r5/transit/TransitLayer.java index 5216f89a4..e7b8f0833 100644 --- a/src/main/java/com/conveyal/r5/transit/TransitLayer.java +++ b/src/main/java/com/conveyal/r5/transit/TransitLayer.java @@ -558,7 +558,11 @@ public void loadFromGtfs (GTFSFeed gtfs, LoadLevel level) throws DuplicateFeedEx } if (level == LoadLevel.FULL) { - this.fares = new HashMap<>(gtfs.fares); + if (this.fares == null) { + this.fares = new HashMap<>(gtfs.fares); + } else { + this.fares.putAll(gtfs.fares); + } } // Will be useful in naming patterns.