commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Pinet (JIRA)" <>
Subject [jira] Updated: (SANDBOX-259) COMPRESS-REDESIGN: Handle JarArchiveInputStream null getNextEntry() gracefully
Date Sat, 27 Sep 2008 19:33:44 GMT


Tim Pinet updated SANDBOX-259:

    Attachment: JarTestCase.patch

JarTestCase.patch: test case to traverse a Jar file to the end of the archive and ensure that
no Exception is thrown. Note: this patch contains code from bug SANDBOX-258 which uses a call
to ArchiveEntry.isDirectory().

> COMPRESS-REDESIGN: Handle JarArchiveInputStream null getNextEntry() gracefully
> ------------------------------------------------------------------------------
>                 Key: SANDBOX-259
>                 URL:
>             Project: Commons Sandbox
>          Issue Type: Bug
>          Components: Compress
>         Environment: N/A
>            Reporter: Tim Pinet
>         Attachments: JarArchiveInputStream.patch, JarTestCase.patch
>   Original Estimate: 10h
>  Remaining Estimate: 10h
> When the method JarArchiveInputStream.getNextEntry() is called after the final archive
entry was already returned, an Exception is thrown. This is due to the request to the super
class ZipArchiveInputStream.getNextEntry() returning null which denotes the archive is at
the end. However that null is used to attempt to try to create a new JarArchiveEntry(null)
instance. It is here where the exception is thrown. I suggest doing a quick null check then
return null if the archive has been fully traversed.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message