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 2020/08/07 16:24:22 UTC

[commons-io] branch master updated: Don't use depreacted constants.

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 cc3e5fb  Don't use depreacted constants.
     new 257d6f4  Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-io.git
cc3e5fb is described below

commit cc3e5fb58d371c8ab3eef800be5e2a40e3fb9179
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Aug 7 12:23:49 2020 -0400

    Don't use depreacted constants.
---
 src/test/java/org/apache/commons/io/FileUtilsTestCase.java | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/test/java/org/apache/commons/io/FileUtilsTestCase.java b/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
index bdbc20d..bfe72fc 100644
--- a/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
+++ b/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
@@ -38,6 +38,7 @@ import java.io.OutputStream;
 import java.math.BigInteger;
 import java.net.URL;
 import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -2384,11 +2385,11 @@ public class FileUtilsTestCase {
         final File file = TestUtils.newFile(temporaryFolder, "lines.txt");
         FileUtils.writeStringToFile(file, "This line was there before you...");
 
-        final byte[] data = "SKIP_THIS_this is brand new data_AND_SKIP_THIS".getBytes(Charsets.UTF_8);
+        final byte[] data = "SKIP_THIS_this is brand new data_AND_SKIP_THIS".getBytes(StandardCharsets.UTF_8);
         FileUtils.writeByteArrayToFile(file, data, 10, 22, true);
 
         final String expected = "This line was there before you..." + "this is brand new data";
-        final String actual = FileUtils.readFileToString(file, Charsets.UTF_8);
+        final String actual = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
         assertEquals(expected, actual);
     }
 
@@ -2397,11 +2398,11 @@ public class FileUtilsTestCase {
         final File file = TestUtils.newFile(temporaryFolder, "lines.txt");
         FileUtils.writeStringToFile(file, "This line was there before you...");
 
-        final byte[] data = "SKIP_THIS_this is brand new data_AND_SKIP_THIS".getBytes(Charsets.UTF_8);
+        final byte[] data = "SKIP_THIS_this is brand new data_AND_SKIP_THIS".getBytes(StandardCharsets.UTF_8);
         FileUtils.writeByteArrayToFile(file, data, 10, 22, false);
 
         final String expected = "this is brand new data";
-        final String actual = FileUtils.readFileToString(file, Charsets.UTF_8);
+        final String actual = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
         assertEquals(expected, actual);
     }