From fe414864a0565d3f4e26ec9de9909873ba16ecca Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 13 May 2022 17:21:43 +0200 Subject: [PATCH] Replace IOUtils with IOUtil, Fix compile errors --- .../sourceforge/pmd/lang/vf/ast/ApexClassPropertyTypes.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/ast/ApexClassPropertyTypes.java b/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/ast/ApexClassPropertyTypes.java index 57fd70b782..e20a1b8f0c 100644 --- a/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/ast/ApexClassPropertyTypes.java +++ b/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/ast/ApexClassPropertyTypes.java @@ -11,7 +11,6 @@ import java.nio.file.Files; import java.nio.file.Path; import java.util.List; -import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.exception.ContextedRuntimeException; import org.apache.commons.lang3.tuple.Pair; import org.slf4j.Logger; @@ -25,6 +24,7 @@ import net.sourceforge.pmd.lang.ast.Parser; import net.sourceforge.pmd.lang.ast.Parser.ParserTask; import net.sourceforge.pmd.lang.ast.SemanticErrorReporter; import net.sourceforge.pmd.lang.vf.DataType; +import net.sourceforge.pmd.util.IOUtil; import apex.jorje.semantic.symbol.type.BasicType; @@ -69,7 +69,7 @@ class ApexClassPropertyTypes extends SalesforceFieldTypes { static Node parseApex(Path apexFilePath) { String fileText; try (BufferedReader reader = Files.newBufferedReader(apexFilePath, StandardCharsets.UTF_8)) { - fileText = IOUtils.toString(reader); + fileText = IOUtil.readToString(reader); } catch (IOException e) { throw new ContextedRuntimeException(e).addContextValue("apexFilePath", apexFilePath); }