mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 00:30:31 +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;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
|
@ -547,6 +548,8 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
|
||||
if (stationBoardHasStationTable)
|
||||
XmlPullUtil.enter(pp, "StationTable");
|
||||
else
|
||||
checkState(!XmlPullUtil.test(pp, "StationTable"));
|
||||
|
||||
if (stationBoardHasLocation)
|
||||
{
|
||||
|
@ -564,6 +567,10 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
}
|
||||
XmlPullUtil.requireSkip(pp, "St");
|
||||
}
|
||||
else
|
||||
{
|
||||
checkState(!XmlPullUtil.test(pp, "St"));
|
||||
}
|
||||
|
||||
while (XmlPullUtil.test(pp, "Journey"))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue