Skip to content

Commit

Permalink
Inline single use variable
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jul 23, 2024
1 parent 770c32f commit c155293
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/apache/commons/io/IOUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -1153,8 +1153,7 @@ public static void copy(final InputStream input, final Writer writer)
*/
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);
}

/**
Expand Down

0 comments on commit c155293

Please sign in to comment.