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 3a17e346 Use constant instead of magic string
3a17e346 is described below

commit 3a17e346e9828838eaa5e6b9c34cfb1b49633850
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sun Dec 10 11:02:16 2023 -0500

    Use constant instead of magic string
---
 .../commons/io/input/UnsynchronizedFilterInputStreamTest.java       | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/io/input/UnsynchronizedFilterInputStreamTest.java
 
b/src/test/java/org/apache/commons/io/input/UnsynchronizedFilterInputStreamTest.java
index e09745a1..25748729 100644
--- 
a/src/test/java/org/apache/commons/io/input/UnsynchronizedFilterInputStreamTest.java
+++ 
b/src/test/java/org/apache/commons/io/input/UnsynchronizedFilterInputStreamTest.java
@@ -130,7 +130,7 @@ public class UnsynchronizedFilterInputStreamTest {
     public void test_read$B() throws IOException {
         final byte[] buf1 = new byte[100];
         is.read(buf1);
-        assertTrue(new String(buf1, 0, buf1.length, 
"UTF-8").equals(DATA.substring(0, 100)), "Failed to read correct data");
+        assertTrue(new String(buf1, 0, buf1.length, 
StandardCharsets.UTF_8).equals(DATA.substring(0, 100)), "Failed to read correct 
data");
     }
 
     /**
@@ -144,7 +144,7 @@ public class UnsynchronizedFilterInputStreamTest {
         is.skip(3000);
         is.mark(1000);
         is.read(buf1, 0, buf1.length);
-        assertTrue(new String(buf1, 0, buf1.length, 
"UTF-8").equals(DATA.substring(3000, 3100)), "Failed to read correct data");
+        assertTrue(new String(buf1, 0, buf1.length, 
StandardCharsets.UTF_8).equals(DATA.substring(3000, 3100)), "Failed to read 
correct data");
     }
 
     /**
@@ -166,6 +166,6 @@ public class UnsynchronizedFilterInputStreamTest {
         final byte[] buf1 = new byte[10];
         is.skip(1000);
         is.read(buf1, 0, buf1.length);
-        assertTrue(new String(buf1, 0, buf1.length, 
"UTF-8").equals(DATA.substring(1000, 1010)), "Failed to skip to correct 
position");
+        assertTrue(new String(buf1, 0, buf1.length, 
StandardCharsets.UTF_8).equals(DATA.substring(1000, 1010)), "Failed to skip to 
correct position");
     }
 }

Reply via email to