commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Bodewig (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COMPRESS-348) Calling SevenZFile.read() on empty SevenZArchiveEntry throws IllegalStateException
Date Fri, 08 Apr 2016 12:11:25 GMT

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

Stefan Bodewig commented on COMPRESS-348:
-----------------------------------------

Thank you for creating a new issue for this.

I had seen your comments in COMPRESS-340 but wanted to create a testcase before opening a
new issue - unfortunately I still need to fine a time slot to do this.

> Calling SevenZFile.read() on empty SevenZArchiveEntry throws IllegalStateException
> ----------------------------------------------------------------------------------
>
>                 Key: COMPRESS-348
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-348
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.11
>            Reporter: Robin Jansohn
>            Priority: Minor
>
> I'm pretty sure COMPRESS-340 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.
> This worked correctly up until 1.10.



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

Mime
View raw message