This is an automated email from the ASF dual-hosted git repository.
pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 62c4f5b Remove explicit zeroing of AtomicLong objects at
instantiation time, which is redundant and slower than relying on default
values.
62c4f5b is described below
commit 62c4f5b6a76a21f8e7e7d0ae4dbc806b58b4c7fb
Author: Pascal Schumacher <[email protected]>
AuthorDate: Fri Oct 2 21:01:42 2020 +0200
Remove explicit zeroing of AtomicLong objects at instantiation time, which
is redundant and slower than relying on default values.
---
.../main/java/org/apache/camel/component/hdfs/HdfsInputStream.java | 4 ++--
.../main/java/org/apache/camel/component/hdfs/HdfsOutputStream.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsInputStream.java
b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsInputStream.java
index 80e4cda..13968d6 100644
---
a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsInputStream.java
+++
b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsInputStream.java
@@ -40,8 +40,8 @@ public class HdfsInputStream implements Closeable {
private Closeable in;
private boolean opened;
private int chunkSize;
- private final AtomicLong numOfReadBytes = new AtomicLong(0L);
- private final AtomicLong numOfReadMessages = new AtomicLong(0L);
+ private final AtomicLong numOfReadBytes = new AtomicLong();
+ private final AtomicLong numOfReadMessages = new AtomicLong();
private boolean streamDownload;
diff --git
a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsOutputStream.java
b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsOutputStream.java
index c192d8c..9867c4f 100644
---
a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsOutputStream.java
+++
b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsOutputStream.java
@@ -34,8 +34,8 @@ public class HdfsOutputStream implements Closeable {
private String suffixedPath;
private Closeable out;
private volatile boolean opened;
- private final AtomicLong numOfWrittenBytes = new AtomicLong(0L);
- private final AtomicLong numOfWrittenMessages = new AtomicLong(0L);
+ private final AtomicLong numOfWrittenBytes = new AtomicLong();
+ private final AtomicLong numOfWrittenMessages = new AtomicLong();
private final AtomicLong lastAccess = new AtomicLong(Long.MAX_VALUE);
private final AtomicBoolean busy = new AtomicBoolean(false);