From ca78111351627b3c914b0fa60c4116af9103d434 Mon Sep 17 00:00:00 2001 From: "andreas.schildbach@gmail.com" Date: Wed, 22 Jun 2011 08:17:41 +0000 Subject: [PATCH] renamed method git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@716 0924bc21-9374-b0fa-ee44-9ff1593b38f0 --- src/de/schildbach/pte/AbstractHafasProvider.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/de/schildbach/pte/AbstractHafasProvider.java b/src/de/schildbach/pte/AbstractHafasProvider.java index 40657498..78e6559a 100644 --- a/src/de/schildbach/pte/AbstractHafasProvider.java +++ b/src/de/schildbach/pte/AbstractHafasProvider.java @@ -646,12 +646,12 @@ public abstract class AbstractHafasProvider implements NetworkProvider final StringBuilder request = new StringBuilder(""); - request.append("").append(location(from)); + request.append("").append(locationXml(from)); request.append(""); request.append(""); if (via != null) - request.append("").append(location(via)).append(""); - request.append("").append(location(to)).append(""); + request.append("").append(locationXml(via)).append(""); + request.append("").append(locationXml(to)).append(""); request.append(""); @@ -1071,17 +1071,17 @@ public abstract class AbstractHafasProvider implements NetworkProvider throw new IllegalArgumentException("cannot parse duration: '" + str + "'"); } - private static final String location(final Location location) + private static final String locationXml(final Location location) { if (location.type == LocationType.STATION && location.hasId()) return ""; - if (location.type == LocationType.POI && location.hasLocation()) + else if (location.type == LocationType.POI && location.hasLocation()) return ""; - if (location.type == LocationType.ADDRESS && location.hasLocation()) + else if (location.type == LocationType.ADDRESS && location.hasLocation()) return "
"; - - throw new IllegalArgumentException("cannot handle: " + location.toDebugString()); + else + throw new IllegalArgumentException("cannot handle: " + location.toDebugString()); } protected final String locationId(final Location location)