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

Robin Jansohn edited comment on COMPRESS-340 at 4/7/16 12:00 PM:
-----------------------------------------------------------------

I'm pretty sure this PR breaks reading empty archive entries. When calling 
getNextEntry() and that entry has no content, the code jumps into the first 
block at line 830 (SevenZFile.class), clearing the deferredBlockStreams. When 
calling entry.read(...) afterwards an IllegalStateException ("No current 7z 
entry (call getNextEntry() first).") is thrown. IMHO, there should be another 
check for entry.getSize() == 0.

EDIT: This worked correctly up until 1.10.


was (Author: jansohn):
I'm pretty sure this PR breaks reading empty archive entries. When calling 
getNextEntry() and that entry has no content, the code jumps into the first 
block at line 830 (SevenZFile.class), clearing the deferredBlockStreams. When 
calling entry.read(...) afterwards an IllegalStateException ("No current 7z 
entry (call getNextEntry() first).") is thrown. IMHO, there should be another 
check for entry.getSize() == 0.

> Provide an efficient way to skip over 7zip entries without decompressing them
> -----------------------------------------------------------------------------
>
>                 Key: COMPRESS-340
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-340
>             Project: Commons Compress
>          Issue Type: Improvement
>          Components: Archivers
>    Affects Versions: 1.10
>            Reporter: Stefan Bodewig
>              Labels: 7zip
>             Fix For: 1.11
>
>
> Actually, this has been resolved by github pull request #8 already, Just 
> opening the issue to track it separately.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to