commons-issues mailing list archives

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

     [ https://issues.apache.org/jira/browse/SANDBOX-259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tim Pinet updated SANDBOX-259:
------------------------------

    Attachment: JarArchiveInputStream.patch

JarArchiveInputStream.patch: recommended fix for JarArchiveInputStream.getNextEntry() to return
null instead of throwing an Exception at the end of an archive.

> COMPRESS-REDESIGN: Handle JarArchiveInputStream null getNextEntry() gracefully
> ------------------------------------------------------------------------------
>
>                 Key: SANDBOX-259
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-259
>             Project: Commons Sandbox
>          Issue Type: Bug
>          Components: Compress
>         Environment: N/A
>            Reporter: Tim Pinet
>         Attachments: JarArchiveInputStream.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.


Mime
View raw message