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 7c01096  Use try-with-resources.
7c01096 is described below

commit 7c01096772cd3a17f30cf91edaa112e0b56d5efa
Author: Gary Gregory <[email protected]>
AuthorDate: Thu May 13 08:59:22 2021 -0400

    Use try-with-resources.
---
 .../org/apache/commons/io/input/CharacterSetFilterReaderTest.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/io/input/CharacterSetFilterReaderTest.java 
b/src/test/java/org/apache/commons/io/input/CharacterSetFilterReaderTest.java
index b76d3f0..54c2da4 100644
--- 
a/src/test/java/org/apache/commons/io/input/CharacterSetFilterReaderTest.java
+++ 
b/src/test/java/org/apache/commons/io/input/CharacterSetFilterReaderTest.java
@@ -64,9 +64,9 @@ public class CharacterSetFilterReaderTest {
         try (StringReader input = new StringReader("a")) {
             final HashSet<Integer> codePoints = new HashSet<>();
             codePoints.add(Integer.valueOf('a'));
-            final CharacterSetFilterReader reader = new 
CharacterSetFilterReader(input, codePoints);
-            assertEquals(-1, reader.read());
-            reader.close();
+            try (final CharacterSetFilterReader reader = new 
CharacterSetFilterReader(input, codePoints)) {
+                assertEquals(-1, reader.read());
+            }
         }
     }
 

Reply via email to