Clear warnings about unused variables and methods.

This commit is contained in:
Andreas Schildbach 2015-02-06 11:07:41 +01:00
parent 0210b4b219
commit 84dbc788ab
3 changed files with 5 additions and 36 deletions

View file

@ -1679,7 +1679,7 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
// misc // misc
/* final String stationName = */normalizeLocationName(XmlPullUtil.valueTag(pp, "n")); /* final String stationName = */normalizeLocationName(XmlPullUtil.valueTag(pp, "n"));
final boolean isRealtime = XmlPullUtil.valueTag(pp, "realtime").equals("1"); /* final boolean isRealtime = */XmlPullUtil.valueTag(pp, "realtime").equals("1");
XmlPullUtil.optSkip(pp, "dt"); XmlPullUtil.optSkip(pp, "dt");

View file

@ -324,20 +324,6 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
throw new IllegalStateException("cannot handle: " + type); throw new IllegalStateException("cannot handle: " + type);
} }
private final Location parseReqLoc(final XmlPullParser pp)
{
final String type = pp.getName();
if ("ReqLoc".equals(type))
{
XmlPullUtil.requireAttr(pp, "type", "ADR");
final String name = XmlPullUtil.attr(pp, "output");
final String[] placeAndName = splitAddress(name);
return new Location(LocationType.ADDRESS, null, placeAndName[0], placeAndName[1]);
}
throw new IllegalStateException("cannot handle: " + type);
}
private final Position parsePlatform(final XmlPullParser pp) throws XmlPullParserException, IOException private final Position parsePlatform(final XmlPullParser pp) throws XmlPullParserException, IOException
{ {
XmlPullUtil.enter(pp, "Platform"); XmlPullUtil.enter(pp, "Platform");
@ -1063,7 +1049,6 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
String name = null; String name = null;
String category = null; String category = null;
String shortCategory = null; String shortCategory = null;
String longCategory = null;
while (XmlPullUtil.test(pp, "JourneyAttribute")) while (XmlPullUtil.test(pp, "JourneyAttribute"))
{ {
XmlPullUtil.enter(pp, "JourneyAttribute"); XmlPullUtil.enter(pp, "JourneyAttribute");
@ -1087,7 +1072,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
{ {
shortCategory = attributeVariants.get("SHORT"); shortCategory = attributeVariants.get("SHORT");
category = attributeVariants.get("NORMAL"); category = attributeVariants.get("NORMAL");
longCategory = attributeVariants.get("LONG"); // longCategory = attributeVariants.get("LONG");
} }
else if ("DIRECTION".equals(attrName)) else if ("DIRECTION".equals(attrName))
{ {
@ -1256,7 +1241,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
private final Location parseLocation(final XmlPullParser pp) throws XmlPullParserException, IOException private final Location parseLocation(final XmlPullParser pp) throws XmlPullParserException, IOException
{ {
Location location; final Location location;
if (pp.getName().equals("Station")) if (pp.getName().equals("Station"))
location = parseStation(pp); location = parseStation(pp);
else if (pp.getName().equals("Poi")) else if (pp.getName().equals("Poi"))
@ -1314,17 +1299,6 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
calendar.add(Calendar.DAY_OF_MONTH, Integer.parseInt(m.group(1))); calendar.add(Calendar.DAY_OF_MONTH, Integer.parseInt(m.group(1)));
} }
private static final Pattern P_DURATION = Pattern.compile("(\\d+):(\\d{2})");
private static final int parseDuration(final CharSequence str)
{
final Matcher m = P_DURATION.matcher(str);
if (m.matches())
return Integer.parseInt(m.group(1)) * 60 + Integer.parseInt(m.group(2));
else
throw new IllegalArgumentException("cannot parse duration: '" + str + "'");
}
private static final String locationXml(final Location location) private static final String locationXml(final Location location)
{ {
if (location.type == LocationType.STATION && location.hasId()) if (location.type == LocationType.STATION && location.hasId())
@ -1801,7 +1775,6 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
String directionStr = null; String directionStr = null;
int lineClass = 0; int lineClass = 0;
String lineCategory = null; String lineCategory = null;
String lineOperator = null;
String routingType = null; String routingType = null;
while (true) while (true)
{ {
@ -1814,8 +1787,8 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
lineClass = Integer.parseInt(strings.read(is)); lineClass = Integer.parseInt(strings.read(is));
else if (key.equals("Category")) else if (key.equals("Category"))
lineCategory = strings.read(is); lineCategory = strings.read(is);
else if (key.equals("Operator")) // else if (key.equals("Operator"))
lineOperator = strings.read(is); // lineOperator = strings.read(is);
else if (key.equals("GisRoutingType")) else if (key.equals("GisRoutingType"))
routingType = strings.read(is); routingType = strings.read(is);
else else

View file

@ -66,9 +66,7 @@ public abstract class AbstractTsiProvider extends AbstractNetworkProvider
{ {
private static final long serialVersionUID = -6847355540229473013L; private static final long serialVersionUID = -6847355540229473013L;
public final Accessibility accessibility;
public final Location from; public final Location from;
public final Set<Option> options;
public final Collection<Product> products; public final Collection<Product> products;
public final Location to; public final Location to;
public final Location via; public final Location via;
@ -85,8 +83,6 @@ public abstract class AbstractTsiProvider extends AbstractNetworkProvider
this.to = to; this.to = to;
this.products = products; this.products = products;
this.walkSpeed = walkSpeed; this.walkSpeed = walkSpeed;
this.accessibility = accessibility;
this.options = options;
} }
public boolean canQueryEarlier() public boolean canQueryEarlier()