You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Stefan Bodewig (JIRA)" <ji...@apache.org> on 2017/09/30 16:10:03 UTC

[jira] [Comment Edited] (COMPRESS-420) Entry missing from ZIP

    [ https://issues.apache.org/jira/browse/COMPRESS-420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16187140#comment-16187140 ] 

Stefan Bodewig edited comment on COMPRESS-420 at 9/30/17 4:09 PM:
------------------------------------------------------------------

So yes, it is COMPRESS-367 - Compress now throws a {{ZipException}} when it detects a corrupt archive where it used to silently stop reading.

In general I think this change is a sensible one, most of the time you want to know the archive is corrupt and not have the library pretend everything was fine.

I wonder if there is anything we can do to adapt this for your use-case. Right now I don't really see what we could do. You could adapt your code to catch {{ZipException}} s thrown from {{getNextEntry}}.


was (Author: bodewig):
So yes, it is COMPRESS-367 - Compress now throws a {{ZipException}} when it detects a corrupt archive where it used to silently stop reading.

In general I think this change is a sensible one, most of the time you want to know the archive is corrupt and not have the library pretend everything was fine.

I wonder if there is anything we can do to adapt this for your use-case. Right now I don't really see what we could do. You could adapt your code to catch {{ZipException}}s thrown from {{getNextEntry}}.

> Entry missing from ZIP
> ----------------------
>
>                 Key: COMPRESS-420
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-420
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Archivers
>    Affects Versions: 1.13, 1.14
>            Reporter: Luke Quinane
>         Attachments: missing-entry.zip, test.zip
>
>
> There seems to be some regression introduced in v1.13 which means that the second entry in the attached ZIP is no longer exposed via: '{{zipFile.getEntries();}}'.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)