vatplanner / dataformats-vatsim-public

library for parsing and processing publicly accessible VATSIM data formats
MIT License
1 stars 0 forks source link

unparseable numbers crash graph import #3

Closed dneuge closed 4 years ago

dneuge commented 4 years ago

It seems that raw flight plans actually contain overlong numbers which crash the graph import, although any unparseable client data should be skipped:

Exception in thread "main" java.lang.NumberFormatException: For input string: "3800000000000000000000000000000000000000000000000000000000000000000000000000"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Long.parseLong(Long.java:592)
        at java.lang.Integer.parseUnsignedInt(Integer.java:679)
        at java.lang.Integer.parseUnsignedInt(Integer.java:711)
        at org.vatplanner.dataformats.vatsimpublic.extraction.AltitudeParser.<init>(AltitudeParser.java:79)
        at org.vatplanner.dataformats.vatsimpublic.graph.GraphImport.getFlightPlan(GraphImport.java:597)
        at org.vatplanner.dataformats.vatsimpublic.graph.GraphImport.importFlightConnected(GraphImport.java:386)
        at org.vatplanner.dataformats.vatsimpublic.graph.GraphImport.importClient(GraphImport.java:154)
        at org.vatplanner.dataformats.vatsimpublic.graph.GraphImport.importDataFile(GraphImport.java:139)