On 04/10/2018 10:36, Jaikiran Pai wrote:
:


The javadoc of JarFile constructor(s) mentions that:

      * @throws IOException if an I/O error has occurred

Given that the javadoc doesn't mention anything about this other
exception, would this throwing of java.nio.file.InvalidPathException be
considered a bug in the implementation?

Yes, it's a bug in the ZipFile code as it's not specified to throw this unchecked exception. Note that the issue is not specific to Windows, you'll see the same thing on Linux/other with other garbage input - a good example to try is a path string with NUL characters.

-Alan

Reply via email to