Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0F029200CFD for ; Wed, 6 Sep 2017 20:03:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0D9331609C5; Wed, 6 Sep 2017 18:03:17 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 557041609BB for ; Wed, 6 Sep 2017 20:03:16 +0200 (CEST) Received: (qmail 31096 invoked by uid 500); 6 Sep 2017 18:03:15 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 31087 invoked by uid 99); 6 Sep 2017 18:03:15 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Sep 2017 18:03:15 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id BCE3F3A00E9 for ; Wed, 6 Sep 2017 18:03:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@commons.apache.org From: ggregory@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170906180314.BCE3F3A00E9@svn01-us-west.apache.org> archived-at: Wed, 06 Sep 2017 18:03:17 -0000 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(); } }