mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +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
|
@ -38,6 +38,8 @@ import org.json.JSONException;
|
|||
import org.json.JSONObject;
|
||||
import org.json.JSONTokener;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import de.schildbach.pte.dto.Departure;
|
||||
import de.schildbach.pte.dto.Line;
|
||||
import de.schildbach.pte.dto.LineDestination;
|
||||
|
@ -836,6 +838,8 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider
|
|||
public QueryDeparturesResult queryDepartures(final String stationId, final @Nullable Date time, final int maxDepartures, final boolean equivs)
|
||||
throws IOException
|
||||
{
|
||||
checkNotNull(Strings.emptyToNull(stationId));
|
||||
|
||||
final ResultHeader resultHeader = new ResultHeader(network, SERVER_PRODUCT, SERVER_VERSION, 0, null);
|
||||
|
||||
try
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue