This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git


The following commit(s) were added to refs/heads/master by this push:
     new c15529377 Inline single use variable
c15529377 is described below

commit c155293776f49eef93547aca9cf181c8a0591cad
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Jul 23 09:32:51 2024 -0400

    Inline single use variable
---
 src/main/java/org/apache/commons/io/IOUtils.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/io/IOUtils.java 
b/src/main/java/org/apache/commons/io/IOUtils.java
index 68cce4578..cd37b674d 100644
--- a/src/main/java/org/apache/commons/io/IOUtils.java
+++ b/src/main/java/org/apache/commons/io/IOUtils.java
@@ -1153,8 +1153,7 @@ public class IOUtils {
      */
     public static void copy(final InputStream input, final Writer writer, 
final Charset inputCharset)
             throws IOException {
-        final InputStreamReader reader = new InputStreamReader(input, 
Charsets.toCharset(inputCharset));
-        copy(reader, writer);
+        copy(new InputStreamReader(input, Charsets.toCharset(inputCharset)), 
writer);
     }
 
     /**

Reply via email to