mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 09:29:49 +00:00
ignore unparsable serving lines
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@324 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
fcdbabfcd6
commit
c0dfae1a39
1 changed files with 13 additions and 6 deletions
|
@ -688,12 +688,19 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
||||||
XmlPullUtil.enter(pp);
|
XmlPullUtil.enter(pp);
|
||||||
while (XmlPullUtil.test(pp, "itdServingLine"))
|
while (XmlPullUtil.test(pp, "itdServingLine"))
|
||||||
{
|
{
|
||||||
final String line = parseLine(pp.getAttributeValue(null, "motType"), pp.getAttributeValue(null, "number"), pp
|
try
|
||||||
.getAttributeValue(null, "number"));
|
{
|
||||||
final String destination = normalizeLocationName(pp.getAttributeValue(null, "direction"));
|
final String line = parseLine(pp.getAttributeValue(null, "motType"), pp.getAttributeValue(null, "number"), pp
|
||||||
final String destinationIdStr = pp.getAttributeValue(null, "destID");
|
.getAttributeValue(null, "number"));
|
||||||
final int destinationId = destinationIdStr.length() > 0 ? Integer.parseInt(destinationIdStr) : 0;
|
final String destination = normalizeLocationName(pp.getAttributeValue(null, "direction"));
|
||||||
lines.add(new Line(line, lineColors(line), destinationId, destination));
|
final String destinationIdStr = pp.getAttributeValue(null, "destID");
|
||||||
|
final int destinationId = destinationIdStr.length() > 0 ? Integer.parseInt(destinationIdStr) : 0;
|
||||||
|
lines.add(new Line(line, lineColors(line), destinationId, destination));
|
||||||
|
}
|
||||||
|
catch (final IllegalArgumentException x)
|
||||||
|
{
|
||||||
|
// swallow for now
|
||||||
|
}
|
||||||
|
|
||||||
XmlPullUtil.enter(pp);
|
XmlPullUtil.enter(pp);
|
||||||
XmlPullUtil.exit(pp);
|
XmlPullUtil.exit(pp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue