On 2009-02-26, Stefan Bodewig <[email protected]> wrote: > On 2009-02-26, Christian Grobmeier <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
