[shrinkwrap-issues] [JBoss JIRA] Commented: (SHRINKWRAP-122) Test for ArchiveImportException if an error occurs during ZipImporter.importZip

Andrew Lee Rubinger (JIRA) jira-events at lists.jboss.org
Sun Jan 24 11:38:19 EST 2010


    [ https://jira.jboss.org/jira/browse/SHRINKWRAP-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12507947#action_12507947 ] 

Andrew Lee Rubinger commented on SHRINKWRAP-122:
------------------------------------------------

Thanks for the submission!

Couple small notes:

1) This covers ZipImporter.importZip(stream); also need a similar one to account for importZip(ZipFile)
2) You don't need to actually get a handle to a real ZIP archive; we could do:

new ZipImportStream(new InputStream(){
  read(){
    throw new IOException("Mock exception");
  }
});

...in this way we don't depend upon the implementation of ZipImportStream to throw an exception if read after closed (exceptions for logic flow), and everything is under our control.

With at least 1) resolved I'm happy commit this patch.

> Test for ArchiveImportException if an error occurs during ZipImporter.importZip
> -------------------------------------------------------------------------------
>
>                 Key: SHRINKWRAP-122
>                 URL: https://jira.jboss.org/jira/browse/SHRINKWRAP-122
>             Project: ShrinkWrap
>          Issue Type: Task
>          Components: impl-base
>            Reporter: Andrew Lee Rubinger
>         Attachments: SHRINKWRAP-122.patch
>
>
> We're missing coverage to ensure that problems with importing from a ZIP result in ArchiveImportException, as stated in the ZipImporter JavaDocs

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the shrinkwrap-issues mailing list