commons-commits mailing list archives

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

URL: http://svn.apache.org/r1568663
Log:
Suppress unnecessary resource 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=1568663&r1=1568662&r2=1568663&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:26:14 2014
@@ -256,9 +256,10 @@ public class SizesTest extends FileUploa
         assertEquals("foo1.tab", item.getName());
 
         {
+            @SuppressWarnings("resource") // Streams.copy closes the input file
             InputStream stream = item.openStream();
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            Streams.copy(stream, baos, true); // Streams.copy closes the input file
+            Streams.copy(stream, baos, true);
         }
 
         // the second item is over the size max, thus we expect an error
@@ -272,9 +273,10 @@ public class SizesTest extends FileUploa
         item = it.next();
 
         try {
+            @SuppressWarnings("resource") // Streams.copy closes the input file
             InputStream stream = item.openStream();
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            Streams.copy(stream, baos, true); // Streams.copy closes the input file
+            Streams.copy(stream, baos, true);
             fail();
         } catch (FileUploadIOException e) {
             // expected



Mime
View raw message