You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2019/01/04 00:14:27 UTC

[maven-surefire] 01/02: removed deprecated method and import in tests [readFileToString(), org.apache.commons.io.Charsets.UTF_8]

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

tibordigana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 71e71805dd8d21d2477b406a15ed60a16a6d2b18
Author: Tibor17 <ti...@apache.org>
AuthorDate: Fri Jan 4 01:05:48 2019 +0100

    removed deprecated method and import in tests [readFileToString(), org.apache.commons.io.Charsets.UTF_8]
---
 .../java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java   | 4 +++-
 .../java/org/apache/maven/surefire/its/fixture/HelperAssertions.java  | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java
index 3511951..2e71dc7 100644
--- a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java
+++ b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java
@@ -45,6 +45,7 @@ import java.util.HashSet;
 import java.util.List;
 
 import static java.io.File.pathSeparator;
+import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.apache.commons.io.FileUtils.readFileToString;
 
 /**
@@ -235,7 +236,8 @@ public class NewClassLoaderRunner
             Collection<URL> classPath = new HashSet<>();
             try
             {
-                String[] files = readFileToString( new File( "target/test-classpath/cp.txt" ) ).split( pathSeparator );
+                String[] files = readFileToString( new File( "target/test-classpath/cp.txt" ), UTF_8 )
+                        .split( pathSeparator );
                 for ( String file : files )
                 {
                     File f = new File( file );
diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
index b8e63f2..324936d 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
@@ -30,7 +30,7 @@ import java.util.Locale;
 
 import static junit.framework.Assert.assertEquals;
 import static junit.framework.Assert.assertTrue;
-import static org.apache.commons.io.Charsets.UTF_8;
+import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.junit.Assume.assumeTrue;
 
 @SuppressWarnings( { "JavaDoc" } )