removed deprecated method and import in tests [readFileToString(), org.apache.commons...
authorTibor17 <tibordigana@apache.org>
Fri, 4 Jan 2019 00:05:48 +0000 (01:05 +0100)
committerTibor17 <tibordigana@apache.org>
Fri, 4 Jan 2019 00:05:48 +0000 (01:05 +0100)
surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java
surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java

index 3511951..2e71dc7 100644 (file)
@@ -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 );
index b8e63f2..324936d 100644 (file)
@@ -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" } )