commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1807511 - /commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/MonitorInputStream.java
Date Wed, 06 Sep 2017 18:03:14 GMT
Author: ggregory
Date: Wed Sep  6 18:03:14 2017
New Revision: 1807511

URL: http://svn.apache.org/viewvc?rev=1807511&view=rev
Log:
Do not hide java.io.BufferedInputStream.count.

Modified:
    commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/MonitorInputStream.java

Modified: commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/MonitorInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/MonitorInputStream.java?rev=1807511&r1=1807510&r2=1807511&view=diff
==============================================================================
--- commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/MonitorInputStream.java
(original)
+++ commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/MonitorInputStream.java
Wed Sep  6 18:03:14 2017
@@ -29,7 +29,7 @@ public class MonitorInputStream
     extends BufferedInputStream
 {
     private final AtomicBoolean finished = new AtomicBoolean(false);
-    private final AtomicLong count = new AtomicLong(0);
+    private final AtomicLong atomicCount = new AtomicLong(0);
 
     public MonitorInputStream(final InputStream in)
     {
@@ -70,7 +70,7 @@ public class MonitorInputStream
         final int ch = super.read();
         if (ch != -1)
         {
-            count.incrementAndGet();
+            atomicCount.incrementAndGet();
             return ch;
         }
 
@@ -99,7 +99,7 @@ public class MonitorInputStream
         final int nread = super.read(buffer, offset, length);
         if (nread != -1)
         {
-            count.addAndGet(nread);
+            atomicCount.addAndGet(nread);
             return nread;
         }
 
@@ -164,6 +164,6 @@ public class MonitorInputStream
      */
     public long getCount()
     {
-        return count.get();
+        return atomicCount.get();
     }
 }



Mime
View raw message