mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 08:49:58 +00:00
AbstractEfaProvider: Replace a few XmlPullUtil.test() with require().
This commit is contained in:
parent
3d294186bd
commit
79db154891
1 changed files with 3 additions and 6 deletions
|
@ -659,8 +659,7 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
|
|||
|
||||
private String processItdOdv(final XmlPullParser pp, final String expectedUsage,
|
||||
final ProcessItdOdvCallback callback) throws XmlPullParserException, IOException {
|
||||
if (!XmlPullUtil.test(pp, "itdOdv"))
|
||||
throw new IllegalStateException("expecting <itdOdv />");
|
||||
XmlPullUtil.require(pp, "itdOdv");
|
||||
|
||||
final String usage = XmlPullUtil.attr(pp, "usage");
|
||||
if (expectedUsage != null && !usage.equals(expectedUsage))
|
||||
|
@ -725,8 +724,7 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
|
|||
}
|
||||
|
||||
private String processItdOdvPlace(final XmlPullParser pp) throws XmlPullParserException, IOException {
|
||||
if (!XmlPullUtil.test(pp, "itdOdvPlace"))
|
||||
throw new IllegalStateException("expecting <itdOdvPlace />");
|
||||
XmlPullUtil.require(pp, "itdOdvPlace");
|
||||
|
||||
final String placeState = XmlPullUtil.attr(pp, "state");
|
||||
|
||||
|
@ -743,8 +741,7 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
|
|||
|
||||
private Location processOdvNameElem(final XmlPullParser pp, String type, final String defaultPlace)
|
||||
throws XmlPullParserException, IOException {
|
||||
if (!XmlPullUtil.test(pp, "odvNameElem"))
|
||||
throw new IllegalStateException("expecting <odvNameElem />");
|
||||
XmlPullUtil.require(pp, "odvNameElem");
|
||||
|
||||
if ("any".equals(type))
|
||||
type = XmlPullUtil.attr(pp, "anyType");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue