Skip to content

Commit 56d34ba

Browse files
committed
Fix for loop condition
1 parent 615ccf9 commit 56d34ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/src/main/java/org/mobilitydata/gtfsvalidator/validator/StopTimeTravelSpeedValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ private void validateConsecutiveStops(
264264
List<TripAndStopTimes> trips, double maxSpeedKph, NoticeContainer noticeContainer) {
265265
final List<GtfsStopTime> stopTimes = trips.get(0).getStopTimes();
266266
GtfsStopTime start = stopTimes.get(0);
267-
for (int i = 0; i < stopTimes.size(); ++i) {
267+
for (int i = 0; i < stopTimes.size() - 1; ++i) {
268268
GtfsStopTime end = stopTimes.get(i + 1);
269269

270270
Optional<Double> maybeDistanceKm = getDistanceKm(start, end);

0 commit comments

Comments
 (0)