OSM-binary icon indicating copy to clipboard operation
OSM-binary copied to clipboard

Fix: Replace invalid UncheckedIOException usage in BinaryParser

Open Manas-Dikshit opened this issue 1 month ago • 1 comments

This PR fixes a compile-time error in BinaryParser.java caused by improper wrapping of a non-IOException inside UncheckedIOException.

Details Removed: throw new UncheckedIOException(new FileFormatException(e)); Added: throw new FileFormatException(e); FileFormatException already extends RuntimeException, making it suitable to throw directly. Also added a small safety check in getStringById() to prevent potential ArrayIndexOutOfBoundsException for malformed PBF data.

Impact Fixes compilation errors in the Java build (mvn package or ant). Improves runtime safety and error clarity when parsing malformed OSM PBF files.

Manas-Dikshit avatar Dec 02 '25 18:12 Manas-Dikshit

Please don't mix unrelated changes in a single PR. In this case the code changes with unrelated whitespace or wording changes. This makes is very hard to review the change set.

joto avatar Dec 03 '25 08:12 joto