mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-13 16:20:34 +00:00
EFA: Handle missing destinations in departure monitor, again.
This commit is contained in:
parent
da0580b64f
commit
1cd17a1814
1 changed files with 10 additions and 4 deletions
|
@ -1606,10 +1606,16 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
||||||
while (XmlPullUtil.test(pp, "itdServingLine"))
|
while (XmlPullUtil.test(pp, "itdServingLine"))
|
||||||
{
|
{
|
||||||
final String assignedStopId = XmlPullUtil.optAttr(pp, "assignedStopID", null);
|
final String assignedStopId = XmlPullUtil.optAttr(pp, "assignedStopID", null);
|
||||||
final String destinationName = normalizeLocationName(XmlPullUtil.attr(pp, "direction"));
|
final String destinationName = normalizeLocationName(XmlPullUtil.optAttr(pp, "direction", null));
|
||||||
final String destinationId = XmlPullUtil.optAttr(pp, "destID", null);
|
final String destinationIdStr = XmlPullUtil.optAttr(pp, "destID", null);
|
||||||
final Location destination = new Location(destinationId != null ? LocationType.STATION : LocationType.ANY, destinationId, null,
|
final String destinationId = !"-1".equals(destinationIdStr) ? destinationIdStr : null;
|
||||||
|
final Location destination;
|
||||||
|
if (destinationId != null || destinationName != null)
|
||||||
|
destination = new Location(destinationId != null ? LocationType.STATION : LocationType.ANY, destinationId, null,
|
||||||
destinationName);
|
destinationName);
|
||||||
|
else
|
||||||
|
destination = null;
|
||||||
|
|
||||||
final LineDestination line = new LineDestination(processItdServingLine(pp), destination);
|
final LineDestination line = new LineDestination(processItdServingLine(pp), destination);
|
||||||
|
|
||||||
StationDepartures assignedStationDepartures;
|
StationDepartures assignedStationDepartures;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue