MetarParser
MetarParser copied to clipboard
Failed to parse java.lang.NumberFormatException: For input string: "//"
MetarService.getInstance().retrieveFromAirport("unnt")
UNNT 170900Z 22005MPS 7000 -SN NSC M21/M25 Q1035 R25/410150 R16/////// NOSIG RMK QFE766/1021
java.lang.NumberFormatException: For input string: "//"
at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.base/java.lang.Double.parseDouble(Double.java:792)
at io.github.mivek.command.metar.RunwayCommand.parseDepositBrakingCapacity(RunwayCommand.java:131)
at io.github.mivek.command.metar.RunwayCommand.execute(RunwayCommand.java:96)
at io.github.mivek.parser.MetarParser.executeCommand(MetarParser.java:105)
at io.github.mivek.parser.MetarParser.parse(MetarParser.java:88)
at io.github.mivek.parser.MetarParser.parse(MetarParser.java:22)
at io.github.mivek.service.MetarService.retrieveFromAirport(MetarService.java:48)
at MainKt.getMetar(Main.kt:19)
Runway information with /// are not parsed by the MetarParser
Runway information with /// are not parsed by the MetarParser
@mivek OK, but why parser doesn't throw something like UnsupportedFormatException with detailed message about why this happened?
That is a good idea, I'm reopening this issue as a feature