This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch 1.x in repository https://gitbox.apache.org/repos/asf/commons-fileupload.git
commit cade07b1a68a576cfc28bc6c86436de552a63bea Author: Gary Gregory <[email protected]> AuthorDate: Sun Aug 25 12:08:02 2024 -0400 Let JUnit handle IOException --- src/test/java/org/apache/commons/fileupload/DefaultFileItemTest.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/test/java/org/apache/commons/fileupload/DefaultFileItemTest.java b/src/test/java/org/apache/commons/fileupload/DefaultFileItemTest.java index fe7a6f78..c0daca09 100644 --- a/src/test/java/org/apache/commons/fileupload/DefaultFileItemTest.java +++ b/src/test/java/org/apache/commons/fileupload/DefaultFileItemTest.java @@ -195,7 +195,7 @@ public class DefaultFileItemTest { * configured threshold. */ @Test - public void testBelowThreshold() { + public void testBelowThreshold() throws IOException { final FileItemFactory factory = createFactory(null); final String textFieldName = "textField"; final String textFieldValue = "0123456789"; @@ -211,8 +211,6 @@ public class DefaultFileItemTest { try (OutputStream os = item.getOutputStream()) { os.write(testFieldValueBytes); - } catch(final IOException e) { - fail("Unexpected IOException"); } assertTrue(item.isInMemory()); assertEquals(item.getSize(), testFieldValueBytes.length);
