Suppress unnecessary resource warning
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/fileupload/trunk@1568663 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/test/java/org/apache/commons/fileupload/SizesTest.java b/src/test/java/org/apache/commons/fileupload/SizesTest.java
index 9a4fd95..064f413 100644
--- a/src/test/java/org/apache/commons/fileupload/SizesTest.java
+++ b/src/test/java/org/apache/commons/fileupload/SizesTest.java
@@ -256,9 +256,10 @@
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 @@
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