r9541 - helma/helma/trunk/src/helma/framework/repository

[email protected]
Newsgroups gmane.comp.java.helma.cvs
Message-ID <20090317142611.2AAF73D0D6@mia>
Author: hannes
Date: 2009-03-17 15:26:11 +0100 (Tue, 17 Mar 2009)
New Revision: 9541

Modified:
   helma/helma/trunk/src/helma/framework/repository/FileResource.java
Log:
Throw exception instead of returning null if file can't be read.

Details at http://dev.helma.org/trac/helma/changeset/9541

Modified: helma/helma/trunk/src/helma/framework/repository/FileResource.java
===================================================================
--- helma/helma/trunk/src/helma/framework/repository/FileResource.java	2009-03-16 14:17:01 UTC (rev 9540)
+++ helma/helma/trunk/src/helma/framework/repository/FileResource.java	2009-03-17 14:26:11 UTC (rev 9541)
@@ -54,12 +54,8 @@
         return baseName;
     }
 
-    public InputStream getInputStream() {
-        try {
-            return new FileInputStream(file);
-        } catch (FileNotFoundException ex) {
-            return null;
-        }
+    public InputStream getInputStream() throws IOException {
+        return new FileInputStream(file);
     }
 
     public URL getUrl() {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.