You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pa...@apache.org on 2020/08/16 15:20:17 UTC

[camel] 02/02: CouchbaseProducer: Avoid potential overflow in integer multiplication.

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

commit 695000151f7b2614a89953ce064faacb9228720f
Author: Pascal Schumacher <pa...@gmx.net>
AuthorDate: Sun Aug 16 17:17:13 2020 +0200

    CouchbaseProducer: Avoid potential overflow in integer multiplication.
---
 .../java/org/apache/camel/component/couchbase/CouchbaseProducer.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseProducer.java b/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseProducer.java
index 4c97728..b31ed72 100644
--- a/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseProducer.java
+++ b/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseProducer.java
@@ -168,7 +168,7 @@ public class CouchbaseProducer extends DefaultProducer {
         UpsertOptions options = UpsertOptions.upsertOptions()
                 .expiry(Duration.ofSeconds(expiry))
                 .durability(persistTo, replicateTo)
-                .timeout(Duration.ofMillis(retryAttempts * producerRetryPause))
+                .timeout(Duration.ofMillis(retryAttempts * (long) producerRetryPause))
                 .retryStrategy(BestEffortRetryStrategy.withExponentialBackoff(Duration.ofMillis(producerRetryPause), Duration.ofMillis(producerRetryPause), 1));
 
         MutationResult result = collection.upsert(id, obj, options);