mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 16:59:51 +00:00
Assert for valid stationId in queryDepartures().
This commit is contained in:
parent
6c934ff071
commit
7545abea7a
7 changed files with 32 additions and 1 deletions
|
@ -17,6 +17,8 @@
|
|||
|
||||
package de.schildbach.pte;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
|
@ -34,6 +36,7 @@ import java.util.regex.Pattern;
|
|||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import de.schildbach.pte.dto.Departure;
|
||||
import de.schildbach.pte.dto.Line;
|
||||
|
@ -175,6 +178,8 @@ public class InvgProvider extends AbstractHafasProvider
|
|||
public QueryDeparturesResult queryDepartures(final String stationId, final @Nullable Date time, final int maxDepartures, final boolean equivs)
|
||||
throws IOException
|
||||
{
|
||||
checkNotNull(Strings.emptyToNull(stationId));
|
||||
|
||||
final ResultHeader header = new ResultHeader(network, SERVER_PRODUCT);
|
||||
final QueryDeparturesResult result = new QueryDeparturesResult(header);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue