diff --git a/pmd-apex/src/test/java/net/sourceforge/pmd/lang/apex/multifile/ApexMultifileAnalysisTest.java b/pmd-apex/src/test/java/net/sourceforge/pmd/lang/apex/multifile/ApexMultifileAnalysisTest.java index 319f265ecf..7f3effa2b7 100644 --- a/pmd-apex/src/test/java/net/sourceforge/pmd/lang/apex/multifile/ApexMultifileAnalysisTest.java +++ b/pmd-apex/src/test/java/net/sourceforge/pmd/lang/apex/multifile/ApexMultifileAnalysisTest.java @@ -15,13 +15,14 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.util.Arrays; -import org.apache.commons.io.IOUtils; import org.checkerframework.checker.nullness.qual.NonNull; import org.junit.Rule; import org.junit.Test; import org.junit.contrib.java.lang.system.SystemErrRule; import org.junit.rules.TemporaryFolder; +import net.sourceforge.pmd.util.IOUtil; + public class ApexMultifileAnalysisTest { @Rule @@ -67,7 +68,7 @@ public class ApexMultifileAnalysisTest { private void copyResource(String resourcePath, String relativePathInTempDir) throws IOException { File file = tempFolder.newFile(relativePathInTempDir); - String fileContents = IOUtils.toString(getClass().getResourceAsStream(resourcePath), StandardCharsets.UTF_8); + String fileContents = IOUtil.readToString(getClass().getResourceAsStream(resourcePath), StandardCharsets.UTF_8); Files.write(file.toPath(), Arrays.asList(fileContents.split("\\R").clone())); }