diff --git a/src/de/schildbach/pte/AbstractHafasProvider.java b/src/de/schildbach/pte/AbstractHafasProvider.java index 0f5c26b3..23cfec1e 100644 --- a/src/de/schildbach/pte/AbstractHafasProvider.java +++ b/src/de/schildbach/pte/AbstractHafasProvider.java @@ -644,26 +644,22 @@ public abstract class AbstractHafasProvider implements NetworkProvider for (final char p : products.toCharArray()) setProductBits(productsStr, p); - final String request = "" // - + "" - + location(from) - + "" // - + "" // - + (via != null ? "" + location(via) + "" : "") // - + "" - + location(to) - + "" // - + "" // - + "" // - + ""; + final StringBuilder request = new StringBuilder(""); - return queryConnections(request, from, via, to); + request.append("").append(location(from)); + request.append(""); + request.append(""); + if (via != null) + request.append("").append(location(via)).append(""); + request.append("").append(location(to)).append(""); + request.append(""); + request.append(""); + request.append(""); + + return queryConnections(request.toString(), from, via, to); } public QueryConnectionsResult queryMoreConnections(final String context) throws IOException