mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 08:40:29 +00:00
fixed parsing with missing intermediate stops
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@338 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
40a19dc534
commit
cda137a4d4
1 changed files with 26 additions and 22 deletions
|
@ -1078,8 +1078,11 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
|||
if (XmlPullUtil.test(pp, "infoLink"))
|
||||
XmlPullUtil.next(pp);
|
||||
|
||||
List<Stop> intermediateStops = null;
|
||||
if (XmlPullUtil.test(pp, "itdStopSeq"))
|
||||
{
|
||||
XmlPullUtil.enter(pp, "itdStopSeq");
|
||||
final List<Stop> intermediateStops = new LinkedList<Stop>();
|
||||
intermediateStops = new LinkedList<Stop>();
|
||||
while (XmlPullUtil.test(pp, "itdPoint"))
|
||||
{
|
||||
final int stopId = Integer.parseInt(pp.getAttributeValue(null, "stopID"));
|
||||
|
@ -1102,6 +1105,7 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
|||
throw new IllegalStateException();
|
||||
intermediateStops.remove(0);
|
||||
intermediateStops.remove(intermediateStops.size() - 1);
|
||||
}
|
||||
|
||||
parts.add(new Connection.Trip(line, lineColors(line), destinationId, destination, departureTime.getTime(),
|
||||
departurePosition, departureId, departure, arrivalTime.getTime(), arrivalPosition, arrivalId, arrival,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue