You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/01/11 12:36:48 UTC

[commons-io] branch master updated: Better local variable name.

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 6369d64  Better local variable name.
6369d64 is described below

commit 6369d6489ea93d655d2f38f799d94c5a255bf1ca
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Jan 11 07:36:45 2022 -0500

    Better local variable name.
---
 .../org/apache/commons/io/output/FileWriterWithEncoding.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java b/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java
index e438dfb..9d935ee 100644
--- a/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java
+++ b/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java
@@ -59,20 +59,20 @@ public class FileWriterWithEncoding extends ProxyWriter {
      */
     private static Writer initWriter(final File file, final Object encoding, final boolean append) throws IOException {
         Objects.requireNonNull(file, "file");
-        OutputStream stream = null;
+        OutputStream outputStream = null;
         final boolean fileExistedAlready = file.exists();
         try {
-            stream = FileUtils.newOutputStream(file, append);
+            outputStream = FileUtils.newOutputStream(file, append);
             if (encoding == null || encoding instanceof Charset) {
-                return new OutputStreamWriter(stream, Charsets.toCharset((Charset) encoding));
+                return new OutputStreamWriter(outputStream, Charsets.toCharset((Charset) encoding));
             }
             if (encoding instanceof CharsetEncoder) {
-                return new OutputStreamWriter(stream, (CharsetEncoder) encoding);
+                return new OutputStreamWriter(outputStream, (CharsetEncoder) encoding);
             }
-            return new OutputStreamWriter(stream, (String) encoding);
+            return new OutputStreamWriter(outputStream, (String) encoding);
         } catch (final IOException | RuntimeException ex) {
             try {
-                IOUtils.close(stream);
+                IOUtils.close(outputStream);
             } catch (final IOException e) {
                 ex.addSuppressed(e);
             }