On Thu, Jan 2, 2014 at 2:22 AM, <bode...@apache.org> wrote: > + try { > + jarFile = new JarFile(file); > + } catch (ZipException notAJar) { > + // raised if a file that is not a ZIP
Would also be thrown if the file _is_ a ZIP file but there was some (potentially significant) error opening it. Could consider checking the file header for the magic sequence {0x50, 0x4b, 0x03, 0x04} and rethrowing the exception. (Have observed {0x50, 0x4b, 0x05, 0x06} in empty archives as well, so maybe just check for {0x50, 0x4b} i.e. "PK".) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org