mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 08:49:58 +00:00
get rid of Status.NO_INFO
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@428 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
289545f9f2
commit
29fd4249eb
5 changed files with 13 additions and 5 deletions
|
@ -22,6 +22,7 @@ import java.text.DateFormat;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.List;
|
||||
|
@ -478,7 +479,8 @@ public final class BahnProvider extends AbstractHafasProvider
|
|||
if (code.equals("H730")) // Your input is not valid
|
||||
return new QueryDeparturesResult(QueryDeparturesResult.Status.INVALID_STATION, Integer.parseInt(stationId));
|
||||
if (code.equals("H890")) // No trains in result
|
||||
return new QueryDeparturesResult(QueryDeparturesResult.Status.NO_INFO, Integer.parseInt(stationId));
|
||||
return new QueryDeparturesResult(new Location(LocationType.STATION, Integer.parseInt(stationId), null),
|
||||
Collections.<Departure> emptyList(), null);
|
||||
throw new IllegalArgumentException("unknown error " + code + ", " + text);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue