conveyal / gtfs-validator

A Java framework for GTFS validation and statistics.
MIT License
38 stars 18 forks source link

"java.util.NoSuchElementException: No value present" exception is raised #28

Closed mohangandhiGH closed 7 years ago

mohangandhiGH commented 7 years ago

In FeedProcessor.java, we are trying to get value from Optional<Date> object without checking whether a value is present in it or not. This throwing an exception "java.util.NoSuchElementException" if we do stats.getCalendarDateStart().get() for null returned value from stats.getCalendarDateStart(). So, before trying to get value, we need to check for null.