peter-mount / opendata

Latest & first public version of my code that monitors the UK Rail Network in real time using Open Data feeds
Other
12 stars 2 forks source link

Public time table entries are not being imported anymore #3

Closed peter-mount closed 10 years ago

peter-mount commented 10 years ago

For some reason a recent change has caused all public timetable entries to be null - so when displayed only the working time table is visible.

Also, WTT pass is also null - so when a train passes a TIPLOC it's not showing any times whatsoever.

Fixing this will require a full import of the timetable database to repair it.

peter-mount commented 10 years ago

Ok found the issue.

In CIFParser I had added a method to see if a field is blank (all spaces). The problem was that the code using it then returned null when it was blank - but didn't advance the parser's position within the CIF record.

This meant that when the next field was read, it failed as it was then reading the wrong field.

So the fix was to add a skip() call when isBlank() returned true.