mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 08:40:29 +00:00
AbstractEfaProvider: Make processCoordinateStrings() to return null if there is no coordinate string.
This commit is contained in:
parent
e179351115
commit
a3e95ddab2
1 changed files with 9 additions and 6 deletions
|
@ -2879,15 +2879,18 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
|
|||
return path;
|
||||
}
|
||||
|
||||
private List<Point> processCoordinateStrings(final XmlPullParser pp, final String tag)
|
||||
private @Nullable List<Point> processCoordinateStrings(final XmlPullParser pp, final String tag)
|
||||
throws XmlPullParserException, IOException {
|
||||
final List<Point> path = new LinkedList<>();
|
||||
|
||||
final String value = XmlPullUtil.valueTag(pp, tag);
|
||||
final String value = XmlPullUtil.optValueTag(pp, tag, null);
|
||||
if (value != null) {
|
||||
for (final String coordStr : value.split(" +"))
|
||||
path.add(parseCoord(coordStr));
|
||||
|
||||
return path;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private List<Point> processCoordinateBaseElems(final XmlPullParser pp) throws XmlPullParserException, IOException {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue