From 3edf968875b77f457ff5d167604d4512262364d1 Mon Sep 17 00:00:00 2001 From: cka-y <60586858+cka-y@users.noreply.github.com> Date: Tue, 9 Jan 2024 14:18:26 -0500 Subject: [PATCH] fix: decreasing_or_equal_stop_time_distance includes prevShapeDistTraveled (#1631) --- .../validator/StopTimeIncreasingDistanceValidator.java | 6 +++--- .../gtfsvalidator/validator/NoticeFieldsTest.java | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/main/src/main/java/org/mobilitydata/gtfsvalidator/validator/StopTimeIncreasingDistanceValidator.java b/main/src/main/java/org/mobilitydata/gtfsvalidator/validator/StopTimeIncreasingDistanceValidator.java index 6c75dd6216..f6ccf8b2ea 100644 --- a/main/src/main/java/org/mobilitydata/gtfsvalidator/validator/StopTimeIncreasingDistanceValidator.java +++ b/main/src/main/java/org/mobilitydata/gtfsvalidator/validator/StopTimeIncreasingDistanceValidator.java @@ -101,7 +101,7 @@ static class DecreasingOrEqualStopTimeDistanceNotice extends ValidationNotice { * Actual distance traveled along the shape from the first shape point to the previous stop * time. */ - private final double prevStopTimeDistTraveled; + private final double prevShapeDistTraveled; /** The previous record's `stop_times.stop_sequence`. */ private final int prevStopSequence; @@ -113,7 +113,7 @@ static class DecreasingOrEqualStopTimeDistanceNotice extends ValidationNotice { double shapeDistTraveled, int stopSequence, long prevCsvRowNumber, - double prevStopTimeDistTraveled, + double prevShapeDistTraveled, int prevStopSequence) { this.tripId = tripId; this.stopId = stopId; @@ -121,7 +121,7 @@ static class DecreasingOrEqualStopTimeDistanceNotice extends ValidationNotice { this.shapeDistTraveled = shapeDistTraveled; this.stopSequence = stopSequence; this.prevCsvRowNumber = prevCsvRowNumber; - this.prevStopTimeDistTraveled = prevStopTimeDistTraveled; + this.prevShapeDistTraveled = prevShapeDistTraveled; this.prevStopSequence = prevStopSequence; } } diff --git a/main/src/test/java/org/mobilitydata/gtfsvalidator/validator/NoticeFieldsTest.java b/main/src/test/java/org/mobilitydata/gtfsvalidator/validator/NoticeFieldsTest.java index a67b558575..7877aa1d0f 100644 --- a/main/src/test/java/org/mobilitydata/gtfsvalidator/validator/NoticeFieldsTest.java +++ b/main/src/test/java/org/mobilitydata/gtfsvalidator/validator/NoticeFieldsTest.java @@ -133,7 +133,6 @@ public void testNoticeClassFieldNames() { "prevShapeDistTraveled", "prevShapePtSequence", "prevStopSequence", - "prevStopTimeDistTraveled", "recordId", "recordSubId", "routeColor",