mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 08:40:29 +00:00
fixed exception when itdMessage is missing from itdDate
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@861 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
40cfcf5016
commit
2b9900d216
1 changed files with 6 additions and 5 deletions
|
@ -1713,11 +1713,12 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
|||
if (!pp.isEmptyElementTag())
|
||||
{
|
||||
XmlPullUtil.enter(pp, "itdDate");
|
||||
if (!XmlPullUtil.test(pp, "itdMessage"))
|
||||
throw new IllegalStateException("cannot find <itdMessage />");
|
||||
final String message = pp.nextText();
|
||||
if (message.equals("invalid date"))
|
||||
return new QueryConnectionsResult(header, QueryConnectionsResult.Status.INVALID_DATE);
|
||||
if (XmlPullUtil.test(pp, "itdMessage"))
|
||||
{
|
||||
final String message = pp.nextText();
|
||||
if (message.equals("invalid date"))
|
||||
return new QueryConnectionsResult(header, QueryConnectionsResult.Status.INVALID_DATE);
|
||||
}
|
||||
XmlPullUtil.exit(pp, "itdDate");
|
||||
}
|
||||
XmlPullUtil.exit(pp, "itdDateTime");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue