commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1638380 - in /commons/proper/fileupload/trunk/src: changes/changes.xml main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
Date Tue, 11 Nov 2014 20:45:17 GMT
Author: tn
Date: Tue Nov 11 20:45:16 2014
New Revision: 1638380

URL: http://svn.apache.org/r1638380
Log:
[FILEUPLOAD-252] Do not lose IO exception when closing the stream.

Modified:
    commons/proper/fileupload/trunk/src/changes/changes.xml
    commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java

Modified: commons/proper/fileupload/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/changes/changes.xml?rev=1638380&r1=1638379&r2=1638380&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/changes/changes.xml (original)
+++ commons/proper/fileupload/trunk/src/changes/changes.xml Tue Nov 11 20:45:16 2014
@@ -44,6 +44,7 @@ The <action> type attribute can be add,u
 
   <body>
     <release version="1.4" date="TBA" description="TBA">
+      <action issue="FILEUPLOAD-252" dev="tn" type="fix">DiskFileItem#write() could
lose original IO exception</action>
       <action issue="FILEUPLOAD-258" dev="tn" type="fix">DiskFileItem#getStoreLocation()
wrongly returned a File object for items stored in memory</action>
       <action issue="FILEUPLOAD-242" dev="tn" type="fix">FileUploadBase - should not
silently catch and ignore all Throwables</action>
       <action issue="FILEUPLOAD-257" dev="tn" type="fix">Fix Javadoc 1.8.0 errors</action>

Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java?rev=1638380&r1=1638379&r2=1638380&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
(original)
+++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
Tue Nov 11 20:45:16 2014
@@ -389,9 +389,7 @@ public class DiskFileItem
                 fout = new FileOutputStream(file);
                 fout.write(get());
             } finally {
-                if (fout != null) {
-                    fout.close();
-                }
+            	IOUtils.closeQuietly(fout);
             }
         } else {
             File outputFile = getStoreLocation();



Mime
View raw message