mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-13 08:10:46 +00:00
fixed exception when destID is missing
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@860 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
24f9393f0d
commit
40cfcf5016
1 changed files with 4 additions and 2 deletions
|
@ -1263,7 +1263,8 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
|||
final int assignedStopId = assignedStopIdStr != null ? Integer.parseInt(assignedStopIdStr) : 0;
|
||||
final String destination = normalizeLocationName(pp.getAttributeValue(null, "direction"));
|
||||
final String destinationIdStr = pp.getAttributeValue(null, "destID");
|
||||
final int destinationId = destinationIdStr.length() > 0 ? Integer.parseInt(destinationIdStr) : 0;
|
||||
final int destinationId = (destinationIdStr != null && destinationIdStr.length() > 0) ? Integer.parseInt(destinationIdStr)
|
||||
: 0;
|
||||
|
||||
final LineDestination line = new LineDestination(processItdServingLine(pp), destinationId, destination);
|
||||
|
||||
|
@ -1327,7 +1328,8 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
|||
XmlPullUtil.require(pp, "itdServingLine");
|
||||
final boolean isRealtime = pp.getAttributeValue(null, "realtime").equals("1");
|
||||
final String destination = normalizeLocationName(pp.getAttributeValue(null, "direction"));
|
||||
final int destinationId = Integer.parseInt(pp.getAttributeValue(null, "destID"));
|
||||
final String destinationIdStr = pp.getAttributeValue(null, "destID");
|
||||
final int destinationId = destinationIdStr != null ? Integer.parseInt(destinationIdStr) : 0;
|
||||
|
||||
final Line line = processItdServingLine(pp);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue