[ 
https://issues.apache.org/jira/browse/SOLR-16716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17704250#comment-17704250
 ] 

ASF subversion and git services commented on SOLR-16716:
--------------------------------------------------------

Commit a35824f56c82d458035f851c40d8636d51f2251f in solr's branch 
refs/heads/main from Kevin Risden
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=a35824f56c8 ]

SOLR-16716: Replace commons-io usages with pure Java (#1478)

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)

---------

Co-authored-by: David Smiley <[email protected]>

> Replace commons-io usages with pure Java
> ----------------------------------------
>
>                 Key: SOLR-16716
>                 URL: https://issues.apache.org/jira/browse/SOLR-16716
>             Project: Solr
>          Issue Type: Task
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Kevin Risden
>            Assignee: Kevin Risden
>            Priority: Minor
>             Fix For: main (10.0)
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Replaces commons-io with JDK methods where possible. Adds the following 
> forbiddenapi rules.
> {code:java}
> @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)
> {code}
> This makes commons-io a test only dependency for analysis-extras and removes 
> commons-io from jwt-auth and extraction.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to