Skip to content

Commit

Permalink
added shouldCallValidate method and null check
Browse files Browse the repository at this point in the history
  • Loading branch information
qcdyx committed Jan 22, 2025
1 parent 2aa7bd2 commit b9dd2b5
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ public void validate(NoticeContainer noticeContainer) {
}
}

@Override
public boolean shouldCallValidate() {
if (routeTable != null && stopTimeTable != null) {
return routeTable.hasColumn(GtfsRoute.CONTINUOUS_PICKUP_FIELD_NAME)
|| routeTable.hasColumn(GtfsRoute.CONTINUOUS_DROP_OFF_FIELD_NAME)
&& (stopTimeTable.hasColumn(GtfsStopTime.START_PICKUP_DROP_OFF_WINDOW_FIELD_NAME)
|| stopTimeTable.hasColumn(GtfsStopTime.END_PICKUP_DROP_OFF_WINDOW_FIELD_NAME));
} else {
return false;
}
}

/**
* Continuous pickup or drop-off are forbidden when routes.continuous_pickup or
* routes.continuous_drop_off are 0, 2 or 3 and stop_times.start_pickup_drop_off_window or
Expand Down

0 comments on commit b9dd2b5

Please sign in to comment.