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

Aslak Knutsen (JIRA) jira-events at lists.jboss.org
Sun Jul 11 14:23:47 EDT 2010


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

Aslak Knutsen edited comment on SHRINKWRAP-204 at 7/11/10 2:22 PM:
-------------------------------------------------------------------

Users of the FileSystem API are expected to handle the checked exception IOExceptions if it should occur. By API. 
I don't see why our implementation should change those rules by throwing a RuntimeException outside the expected type tree.

As long as we're implementing a defined API, we should follow that API whether we feel it to be the ultimate correct way or not.

I agree, we can throw a subclass instead of the raw IOException. e.g. AssetNotFoundException

      was (Author: aslak):
    Users of the FileSystem API are expected to handle the checked exception IOExceptions if it should occur. By API. 
I don't see why our implementation should change those rules by throwing a RuntimeException outside the expected type tree.

As long as we're implementing a defined API, we should follow that API whether we feel it to be the ultimate correct way or not.

I agree, we can throw a subclass instead of the raw IOException. e.g. AssetNoFoundException
  
> 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