[shrinkwrap-issues] [JBoss JIRA] Commented: (SHRINKWRAP-204) ArchiveFileSystem.openInputStream returns null on missing Asset, should throw IOException

Aslak Knutsen (JIRA) jira-events at lists.jboss.org
Sun Jul 11 10:25:46 EDT 2010


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

Aslak Knutsen commented on SHRINKWRAP-204:
------------------------------------------

Motivation for throwing an IOException is that a Exception is expected by the API, returning null is not. 

Using IOException over IllegalArchivePathException since IOException is described by the API and is also used around the Java APIs to handle similar cases where resources are missing, as well as problems reading/writing bytes. e.g. FileNotFoundException extends IOException.

Some uses of the FileSystem API rely on a Exception during URL.openStream to determine if it exists or not. 
e.g. URLClassPath$Loader#getResource:518 (in this case it can be any Exception, not only IOException)



> ArchiveFileSystem.openInputStream returns null on missing Asset, should throw IOException
> -----------------------------------------------------------------------------------------
>
>                 Key: SHRINKWRAP-204
>                 URL: https://jira.jboss.org/browse/SHRINKWRAP-204
>             Project: ShrinkWrap
>          Issue Type: Bug
>          Components: ext-vfs3
>    Affects Versions: 1.0.0-alpha-10
>            Reporter: Aslak Knutsen
>            Assignee: Aslak Knutsen
>             Fix For: 1.0.0-alpha-11
>
>
> Opening a InputStream to a non existing Asset should result in IOException

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

        


More information about the shrinkwrap-issues mailing list