commit | f4cfc42d291350bb5d6c8ae062a8a3d3aba59f2e | [log] [tgz] |
---|---|---|
author | Sebastian Bazley <sebb@apache.org> | Sat Feb 15 18:25:18 2014 +0000 |
committer | Sebastian Bazley <sebb@apache.org> | Sat Feb 15 18:25:18 2014 +0000 |
tree | f260239e65b4676ddc9065f8731bd643048d17d2 | |
parent | ebdd8131410a5b516270a3bbcd518889bd4603ff [diff] |
Unnecessary try/catch git-svn-id: https://svn.apache.org/repos/asf/commons/proper/fileupload/trunk@1568662 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 3cd0111..9a4fd95 100644 --- a/src/test/java/org/apache/commons/fileupload/SizesTest.java +++ b/src/test/java/org/apache/commons/fileupload/SizesTest.java
@@ -255,12 +255,10 @@ assertEquals("file1", item.getFieldName()); assertEquals("foo1.tab", item.getName()); - try { + { InputStream stream = item.openStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); Streams.copy(stream, baos, true); // Streams.copy closes the input file - } catch (FileUploadIOException e) { - fail(e.getMessage()); } // the second item is over the size max, thus we expect an error