error on unknown message

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@862 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2011-12-20 16:44:24 +00:00
parent 2b9900d216
commit a6ca6f27f0

View file

@ -1716,8 +1716,10 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
if (XmlPullUtil.test(pp, "itdMessage")) if (XmlPullUtil.test(pp, "itdMessage"))
{ {
final String message = pp.nextText(); final String message = pp.nextText();
if (message.equals("invalid date")) if ("invalid date".equals(message))
return new QueryConnectionsResult(header, QueryConnectionsResult.Status.INVALID_DATE); return new QueryConnectionsResult(header, QueryConnectionsResult.Status.INVALID_DATE);
else
throw new IllegalStateException("unknown message: " + message);
} }
XmlPullUtil.exit(pp, "itdDate"); XmlPullUtil.exit(pp, "itdDate");
} }