Details
-
Task
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Replaces commons-io with JDK methods where possible. Adds the following forbiddenapi rules.
@defaultMessage Use java.nio.file.Files#copy(java.nio.file.Path, java.nio.file.Path) instead org.apache.commons.io.FileUtils#copyFile(java.io.File, java.io.File) @defaultMessage Use Files.readString instead org.apache.commons.io.FileUtils#readFileToString(**) @defaultMessage Use OutputStream.nullOutputStream() instead org.apache.commons.io.output.NullPrintStream @defaultMessage Use org.apache.solr.common.util.IOUtils.closeQuietly or try-with-resources org.apache.commons.io.IOUtils#closeQuietly(**) @defaultMessage Use new String(inputstream.readAllBytes(), StandardCharsets.UTF_8) org.apache.commons.io.IOUtils#toString(java.io.InputStream, java.lang.String) @defaultMessage Use readAllBytes() method on InputStream org.apache.commons.io.IOUtils#toByteArray(java.io.InputStream) org.apache.commons.io.IOUtils#toByteArray(java.net.URL)
This makes commons-io a test only dependency for analysis-extras and removes commons-io from jwt-auth and extraction.