This is an automated email from the ASF dual-hosted git repository.
davsclaus 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 409eacc CAMEL-13414 use System.currentTimeMillis() (#2868)
409eacc is described below
commit 409eacc3e4696d0d220f6c33d2c6b44bafa4084e
Author: bd2019us <[email protected]>
AuthorDate: Fri Apr 12 11:36:59 2019 -0500
CAMEL-13414 use System.currentTimeMillis() (#2868)
---
.../apache/camel/component/docker/consumer/DockerEventsConsumer.java | 2 +-
.../file/remote/strategy/SftpChangedExclusiveReadLockStrategy.java | 4 ++--
.../src/main/java/org/apache/camel/component/mail/NowSearchTerm.java | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/components/camel-docker/src/main/java/org/apache/camel/component/docker/consumer/DockerEventsConsumer.java
b/components/camel-docker/src/main/java/org/apache/camel/component/docker/consumer/DockerEventsConsumer.java
index ad3153a..50c9689 100644
---
a/components/camel-docker/src/main/java/org/apache/camel/component/docker/consumer/DockerEventsConsumer.java
+++
b/components/camel-docker/src/main/java/org/apache/camel/component/docker/consumer/DockerEventsConsumer.java
@@ -54,7 +54,7 @@ public class DockerEventsConsumer extends DefaultConsumer {
* Determine the point in time to begin streaming events
*/
private long processInitialEvent() {
- long currentTime = new Date().getTime();
+ long currentTime = System.currentTimeMillis();
Long initialRange =
DockerHelper.getProperty(DockerConstants.DOCKER_INITIAL_RANGE,
endpoint.getConfiguration(), null, Long.class);
if (initialRange != null) {
currentTime = currentTime - initialRange;
diff --git
a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpChangedExclusiveReadLockStrategy.java
b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpChangedExclusiveReadLockStrategy.java
index f80d7cf..dab27fc 100644
---
a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpChangedExclusiveReadLockStrategy.java
+++
b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpChangedExclusiveReadLockStrategy.java
@@ -54,7 +54,7 @@ public class SftpChangedExclusiveReadLockStrategy implements
GenericFileExclusiv
long lastModified = Long.MIN_VALUE;
long length = Long.MIN_VALUE;
StopWatch watch = new StopWatch();
- long startTime = new Date().getTime();
+ long startTime = System.currentTimeMillis();
while (!exclusive) {
// timeout check
@@ -216,4 +216,4 @@ public class SftpChangedExclusiveReadLockStrategy
implements GenericFileExclusiv
public void setDeleteOrphanLockFiles(boolean deleteOrphanLockFiles) {
// noop - not supported by ftp
}
-}
\ No newline at end of file
+}
diff --git
a/components/camel-mail/src/main/java/org/apache/camel/component/mail/NowSearchTerm.java
b/components/camel-mail/src/main/java/org/apache/camel/component/mail/NowSearchTerm.java
index f0f3175..37d94d5 100644
---
a/components/camel-mail/src/main/java/org/apache/camel/component/mail/NowSearchTerm.java
+++
b/components/camel-mail/src/main/java/org/apache/camel/component/mail/NowSearchTerm.java
@@ -51,7 +51,7 @@ public class NowSearchTerm extends ComparisonTerm {
}
private Date getDate() {
- long now = new Date().getTime();
+ long now = System.currentTimeMillis();
return new Date(now + offset);
}