If you analyze a feed from the CSVDownloader using a region_id like -1-Portland, you'll get the error:
Exception in thread "main" java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:592)
at java.lang.Integer.parseInt(Integer.java:615)
at edu.usf.cutr.transitfeedqualitycalculator.ResultsAnalyzer.analyzeResults(ResultsAnalyzer.java:84)
at edu.usf.cutr.transitfeedqualitycalculator.TransitFeedQualityCalculator.calculate(TransitFeedQualityCalculator.java:112)
at edu.usf.cutr.transitfeedqualitycalculator.Main.main(Main.java:54)
The analyzer is relying on a single - to split an ID from the region name. We should update the analyzer to be more flexible and not require strict naming conventions like ID-RegionName.
Steps to reproduce:
Run java -Djsse.enableSNIExtension=false -jar target/transit-feed-quality-calculator-1.0.0-SNAPSHOT.jar -directory output -csv feeds.csv
Summary:
Originally reported in https://github.com/CUTR-at-USF/transit-feed-quality-calculator/issues/23.
If you analyze a feed from the CSVDownloader using a
region_id
like-1-Portland
, you'll get the error:The analyzer is relying on a single
-
to split an ID from the region name. We should update the analyzer to be more flexible and not require strict naming conventions like ID-RegionName.Steps to reproduce:
Run
java -Djsse.enableSNIExtension=false -jar target/transit-feed-quality-calculator-1.0.0-SNAPSHOT.jar -directory output -csv feeds.csv
... where
feeds.csv
contains:Expected behavior:
Validate and analyze the feeds without a problem
Observed behavior:
NumberFormatException
when analyzing the feedsPlatform:
Windows 7 Enterprise SP1 with Java 64bit 9.0.1