Open jaller94 opened 6 years ago
A line product can be null, and in this case it's even documented.
Yep, it can be null
, but Trip#products()
doesn't check for null
and crashes.
Good point. That's indeed a bug.
@grote Hi, I would be happy to look at this. However, I am having some trouble setting up my development environment. I am able to clone the public-transport-enabler repository and add my changes. However, I am uncertain about how to import a local dependancy (my modified public-transport-enabler) into build.gradle for transportr. I have tried googling and researching for the past two days and I keep getting errors syncing my build.gradle.
If you could help me out. I would be happy to fix this bug and another bug I have found. Please provide me with contact information whenever you can. I can communicate via email, irc, xmpp, or matrix.
Thanks
The new dataset from British Columbia, Canada includes SkyTrains. These are the light rail lines in Vancouver.
By error the product type can not be read and causes a NullPointerException. While the data source should be fixed on it’s own, the library should not crash when a product cannot be read.
Where it happens: https://github.com/schildbach/public-transport-enabler/blob/9fbd1f1864197b03cb6e25554991235894ccd161/enabler/src/de/schildbach/pte/dto/Trip.java#L227 How it was found: grote/Transportr#466