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 2019/08/19 20:09:28 UTC

[commons-vfs] branch master updated: Simplify.

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-vfs.git


The following commit(s) were added to refs/heads/master by this push:
     new a7cb8ba  Simplify.
a7cb8ba is described below

commit a7cb8baf60a511f17c0669b58b909d505eb1e91c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Aug 19 13:09:24 2019 -0700

    Simplify.
---
 .../main/java/org/apache/commons/vfs2/util/MonitorInputStream.java  | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/MonitorInputStream.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/MonitorInputStream.java
index 75e87af..642ef46 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/MonitorInputStream.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/MonitorInputStream.java
@@ -82,10 +82,9 @@ public class MonitorInputStream extends BufferedInputStream {
         final int ch = super.read();
         if (ch != EOF_CHAR) {
             atomicCount.incrementAndGet();
-            return ch;
         }
 
-        return EOF_CHAR;
+        return ch;
     }
 
     /**
@@ -106,9 +105,8 @@ public class MonitorInputStream extends BufferedInputStream {
         final int nread = super.read(buffer, offset, length);
         if (nread != EOF_CHAR) {
             atomicCount.addAndGet(nread);
-            return nread;
         }
-        return EOF_CHAR;
+        return nread;
     }
 
     /**