On 2009-02-26, Stefan Bodewig <bode...@apache.org> wrote: > On 2009-02-26, Christian Grobmeier <grobme...@gmail.com> wrote:
>> I recently figured out that a compress created zip file doesn't >> necessary match the signature of >> ZipArchiveInputStream.matches(...) > This is because the method is wrong - will be "fixed" in a few > minutes, see below. Note that JarArchiveInputStream.matches was just as wrong but with the added twist that it expected the general purpose bit 3 to be on (while zip expected it to be off). What this really means is "if the bit is set, I'm using the DEFLATED method and store the length inside the data descriptor" - something that is completely irrelevant to the question of whether it is a jar or a zip file. Given that jars are zips, you can't really autodetect jars and the new code reflects this - I had to change the unit test which assumed one could. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org