mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 22:28:51 +00:00
AbstractEfaProvider: handle missing currency in <itdSingleTicket>
This commit is contained in:
parent
64defb58ad
commit
295cbdc3c8
1 changed files with 30 additions and 27 deletions
|
@ -2405,7 +2405,9 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
|
||||||
if (XmlPullUtil.test(pp, "itdSingleTicket")) {
|
if (XmlPullUtil.test(pp, "itdSingleTicket")) {
|
||||||
final String net = XmlPullUtil.optAttr(pp, "net", null);
|
final String net = XmlPullUtil.optAttr(pp, "net", null);
|
||||||
if (net != null) {
|
if (net != null) {
|
||||||
final Currency currency = parseCurrency(XmlPullUtil.attr(pp, "currency"));
|
final String currencyStr = Strings.emptyToNull(XmlPullUtil.optAttr(pp, "currency", null));
|
||||||
|
if (currencyStr != null) {
|
||||||
|
final Currency currency = parseCurrency(currencyStr);
|
||||||
final String fareAdult = XmlPullUtil.optAttr(pp, "fareAdult", null);
|
final String fareAdult = XmlPullUtil.optAttr(pp, "fareAdult", null);
|
||||||
final String fareChild = XmlPullUtil.optAttr(pp, "fareChild", null);
|
final String fareChild = XmlPullUtil.optAttr(pp, "fareChild", null);
|
||||||
final String unitName = XmlPullUtil.optAttr(pp, "unitName", null);
|
final String unitName = XmlPullUtil.optAttr(pp, "unitName", null);
|
||||||
|
@ -2438,6 +2440,7 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
XmlPullUtil.skipExit(pp, "itdFare");
|
XmlPullUtil.skipExit(pp, "itdFare");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue