From 4f1e95dae35e3de67375d9594f1c30b70374f4cf Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 24 Jun 2022 16:07:26 +0200 Subject: [PATCH] Fix compile error --- .../pmd/lang/apex/multifile/ApexMultifileAnalysisTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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())); }