File tree Expand file tree Collapse file tree
src/main/java/com/cta4j/alert/routestatus Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,6 +62,8 @@ default List<RouteStatus> findByType(ServiceType type) {
6262 * @return a {@link List} of {@link RouteStatus}es associated with the bus route IDs, or an empty {@link List} if
6363 * no route statuses are found for the bus route IDs
6464 * @throws NullPointerException if {@code routeIds} is {@code null} or contains {@code null} elements
65+ * @throws IllegalArgumentException if any of the {@code routeIds} matches a train line code (e.g. {@code "Red"});
66+ * use {@link #findByLines(Collection)} instead
6567 * @throws Cta4jRouteStatusException if the API returns an error response or the response cannot be parsed
6668 */
6769 List <RouteStatus > findByBusRouteIds (Collection <String > routeIds );
@@ -73,6 +75,8 @@ default List<RouteStatus> findByType(ServiceType type) {
7375 * @return a {@link List} of {@link RouteStatus}es associated with the bus route ID, or an empty {@link List} if
7476 * no route statuses are found for the bus route ID
7577 * @throws NullPointerException if {@code routeId} is {@code null}
78+ * @throws IllegalArgumentException if {@code routeId} matches a train line code (e.g. {@code "Red"}); use
79+ * {@link #findByLine(TrainLine)} instead
7680 * @throws Cta4jRouteStatusException if the API returns an error response or the response cannot be parsed
7781 */
7882 default List <RouteStatus > findByBusRouteId (String routeId ) {
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public final class RouteStatusApiImpl implements RouteStatusApi {
4040 private final AlertApiConfig config ;
4141
4242 public RouteStatusApiImpl (AlertApiConfig config ) {
43- this .config = config ;
43+ this .config = Objects . requireNonNull ( config ) ;
4444 }
4545
4646 @ Override
You can’t perform that action at this time.
0 commit comments