Changeset 14979 in josm


Ignore:
Timestamp:
2019-04-09T19:45:10+02:00 (7 months ago)
Author:
Don-vip
Message:

fix #17573 - wrap InvalidPathException in IOException

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/Compression.java

    r13838 r14979  
    176176     */
    177177    public static InputStream getUncompressedFileInputStream(File file) throws IOException {
    178         InputStream in = Files.newInputStream(file.toPath());
    179178        try {
    180             return byExtension(file.getName()).getUncompressedInputStream(in);
    181         } catch (IOException e) {
    182             Utils.close(in);
    183             throw e;
     179            InputStream in = Files.newInputStream(file.toPath());
     180            try {
     181                return byExtension(file.getName()).getUncompressedInputStream(in);
     182            } catch (IOException e) {
     183                Utils.close(in);
     184                throw e;
     185            }
     186        } catch (InvalidPathException e) {
     187            throw new IOException(e);
    184188        }
    185189    }
Note: See TracChangeset for help on using the changeset viewer.