commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1568660 - /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/SizesTest.java
Date Sat, 15 Feb 2014 18:23:08 GMT
Author: sebb
Date: Sat Feb 15 18:23:08 2014
New Revision: 1568660

URL: http://svn.apache.org/r1568660
Log:
Document resource leak warning

Modified:
    commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/SizesTest.java

Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/SizesTest.java
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/SizesTest.java?rev=1568660&r1=1568659&r2=1568660&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/SizesTest.java
(original)
+++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/SizesTest.java
Sat Feb 15 18:23:08 2014
@@ -258,7 +258,7 @@ public class SizesTest extends FileUploa
         try {
             InputStream stream = item.openStream();
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            Streams.copy(stream, baos, true);
+            Streams.copy(stream, baos, true); // Streams.copy closes the input file
         } catch (FileUploadIOException e) {
             fail(e.getMessage());
         }
@@ -276,7 +276,7 @@ public class SizesTest extends FileUploa
         try {
             InputStream stream = item.openStream();
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            Streams.copy(stream, baos, true);
+            Streams.copy(stream, baos, true); // Streams.copy closes the input file
             fail();
         } catch (FileUploadIOException e) {
             // expected



Mime
View raw message