[
https://jira.jboss.org/browse/SHRINKWRAP-204?page=com.atlassian.jira.plug...
]
Andrew Lee Rubinger commented on SHRINKWRAP-204:
------------------------------------------------
I don't think as a general rule, we should be pointing to the java.io relying upon
FileNotFoundException for flow control as an example of "what to do". The
difference is this:
File operations are not isolated to a particular O/S process. This means that you cannot
ever, in an atomic operation, check File.exists() and be ensured that the File will still
be there when you go to open the stream. FileNotFoundException is therefore required
handling for stuff like URL.openStream. And I've never really felt it should extend
IOException (hence force the user to handle it / be checked).
The current patch here now throws IOException, which doesn't really say anything to
the type system about what's going on. At a minimum, I think we should be throwing a
subclass of IOException, but really I think IllegalArchivePathException makes more sense
here.
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