mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-20 17:29:51 +00:00
AbstractEfaProvider: handle missing/invalid coordinate in <coordInfoItem>
This commit is contained in:
parent
295cbdc3c8
commit
678f235d16
1 changed files with 18 additions and 16 deletions
|
@ -523,7 +523,8 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
|
|||
|
||||
// FIXME this is always only one coordinate
|
||||
final List<Point> path = processItdPathCoordinates(pp);
|
||||
final Point coord1 = path != null ? path.get(0) : null;
|
||||
if (path != null) {
|
||||
final Point coord1 = path.get(0);
|
||||
|
||||
EnumSet<Product> products = null;
|
||||
if (XmlPullUtil.optEnter(pp, "genAttrList")) {
|
||||
|
@ -542,12 +543,13 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
|
|||
XmlPullUtil.skipExit(pp, "genAttrList");
|
||||
}
|
||||
|
||||
XmlPullUtil.skipExit(pp, "coordInfoItem");
|
||||
|
||||
if (name != null)
|
||||
locations.add(new Location(locationType, id, coord1, place, name, products));
|
||||
}
|
||||
|
||||
XmlPullUtil.skipExit(pp, "coordInfoItem");
|
||||
}
|
||||
|
||||
XmlPullUtil.skipExit(pp, "coordInfoItemList");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue