JOSM does not close file handle when parsing fails
|Reported by:||AM909||Owned by:||team|
|Version:||tested||Keywords:||file handle close open|
If you drag and drop a malformed OSM XML file onto JOSM, after it issues the error, it fails to close the file handle on that file, so you can't delete the file without closing JOSM. It should close the file handle if it can't keep the file open for editing.
Example malformed file:
<?xml version="1.0" encoding="UTF-8"?> <osm version="0.6" generator="Overpass API"> <node id="91287560" lat="35.0746370" lon="-120.0014730"/> </osm>
results in error:
Could not read file 'temp.osm'. Error is: Missing attribute 'version' on OSM primitive with ID 91287560. (at line 3, column 60)