mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-17 13:59:50 +00:00
Hafas: Assert for non-presence of <StationTable> and <St> on station board.
This commit is contained in:
parent
2fe5f00693
commit
00029ecddc
1 changed files with 7 additions and 0 deletions
|
@ -18,6 +18,7 @@
|
||||||
package de.schildbach.pte;
|
package de.schildbach.pte;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
import static com.google.common.base.Preconditions.checkState;
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
|
@ -547,6 +548,8 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
||||||
|
|
||||||
if (stationBoardHasStationTable)
|
if (stationBoardHasStationTable)
|
||||||
XmlPullUtil.enter(pp, "StationTable");
|
XmlPullUtil.enter(pp, "StationTable");
|
||||||
|
else
|
||||||
|
checkState(!XmlPullUtil.test(pp, "StationTable"));
|
||||||
|
|
||||||
if (stationBoardHasLocation)
|
if (stationBoardHasLocation)
|
||||||
{
|
{
|
||||||
|
@ -564,6 +567,10 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
||||||
}
|
}
|
||||||
XmlPullUtil.requireSkip(pp, "St");
|
XmlPullUtil.requireSkip(pp, "St");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
checkState(!XmlPullUtil.test(pp, "St"));
|
||||||
|
}
|
||||||
|
|
||||||
while (XmlPullUtil.test(pp, "Journey"))
|
while (XmlPullUtil.test(pp, "Journey"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue