You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/09/27 20:25:26 UTC

[commons-io] branch master updated: Add testTryWithResourcesThrows().

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git


The following commit(s) were added to refs/heads/master by this push:
     new ca12f41  Add testTryWithResourcesThrows().
ca12f41 is described below

commit ca12f41a5448bee7725593dfcbcdecec78503233
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Sep 27 16:25:24 2021 -0400

    Add testTryWithResourcesThrows().
---
 src/test/java/org/apache/commons/io/input/BrokenReaderTest.java | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/test/java/org/apache/commons/io/input/BrokenReaderTest.java b/src/test/java/org/apache/commons/io/input/BrokenReaderTest.java
index ba26938..7f70493 100644
--- a/src/test/java/org/apache/commons/io/input/BrokenReaderTest.java
+++ b/src/test/java/org/apache/commons/io/input/BrokenReaderTest.java
@@ -86,4 +86,11 @@ public class BrokenReaderTest {
         assertEquals(exception, assertThrows(IOException.class, () -> brokenReader.skip(1)));
     }
 
+    @Test
+    public void testTryWithResourcesThrows() throws IOException {
+        try (Reader newReader = new BrokenReader()) {
+            newReader.read();
+        }
+    }
+
 }