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 b11083d5 Only need 'this' in ctor and setters
b11083d5 is described below
commit b11083d53d754fe3645d4c55ae6b6100ca477807
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Dec 28 10:52:26 2023 -0500
Only need 'this' in ctor and setters
---
.../java/org/apache/commons/io/input/CountingInputStream.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/commons/io/input/CountingInputStream.java
b/src/main/java/org/apache/commons/io/input/CountingInputStream.java
index 233af2a1..a3c11aa8 100644
--- a/src/main/java/org/apache/commons/io/input/CountingInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/CountingInputStream.java
@@ -52,7 +52,7 @@ public class CountingInputStream extends ProxyInputStream {
@Override
protected synchronized void afterRead(final int n) {
if (n != EOF) {
- this.count += n;
+ count += n;
}
}
@@ -68,7 +68,7 @@ public class CountingInputStream extends ProxyInputStream {
* @since 1.3
*/
public synchronized long getByteCount() {
- return this.count;
+ return count;
}
/**
@@ -104,8 +104,8 @@ public class CountingInputStream extends ProxyInputStream {
* @since 1.3
*/
public synchronized long resetByteCount() {
- final long tmp = this.count;
- this.count = 0;
+ final long tmp = count;
+ count = 0;
return tmp;
}
@@ -142,7 +142,7 @@ public class CountingInputStream extends ProxyInputStream {
@Override
public synchronized long skip(final long length) throws IOException {
final long skip = super.skip(length);
- this.count += skip;
+ count += skip;
return skip;
}