fixed ArrayIndexOutOfBoundsException

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@805 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2011-10-03 10:03:33 +00:00
parent 6beeaa40eb
commit 05bdc80e14

View file

@ -1968,7 +1968,7 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
throw new IllegalStateException("unknown type: " + type); throw new IllegalStateException("unknown type: " + type);
XmlPullUtil.enter(pp, "itdCoordinateString"); XmlPullUtil.enter(pp, "itdCoordinateString");
for (final String coordStr : pp.getText().split(" ")) for (final String coordStr : pp.getText().split(" +"))
{ {
final String[] coordsStr = coordStr.split(","); final String[] coordsStr = coordStr.split(",");
path.add(new Point(Math.round(Float.parseFloat(coordsStr[1])), Math.round(Float.parseFloat(coordsStr[0])))); path.add(new Point(Math.round(Float.parseFloat(coordsStr[1])), Math.round(Float.parseFloat(coordsStr[0]))));