You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/10/13 14:45:53 UTC

[camel] branch camel-3.4.x updated: CAMEL-15682: Fixed aggregate EIP to use long value for default timeout value as that can cause class cast exception. Thanks to David Borsos for reporting and suggested fix.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-3.4.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-3.4.x by this push:
     new db3667b  CAMEL-15682: Fixed aggregate EIP to use long value for default timeout value as that can cause class cast exception. Thanks to David Borsos for reporting and suggested fix.
db3667b is described below

commit db3667b4485aa12d918844d1e57129d7f84153eb
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Oct 13 16:39:36 2020 +0200

    CAMEL-15682: Fixed aggregate EIP to use long value for default timeout value as that can cause class cast exception. Thanks to David Borsos for reporting and suggested fix.
---
 .../java/org/apache/camel/processor/aggregate/AggregateProcessor.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/camel-base/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java b/core/camel-base/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
index aada58c..4bf9864 100644
--- a/core/camel-base/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
+++ b/core/camel-base/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
@@ -891,7 +891,7 @@ public class AggregateProcessor extends AsyncProcessorSupport implements Navigat
         for (String key : keys) {
             Exchange exchange = aggregationRepository.get(camelContext, key);
             // grab the timeout value
-            long timeout = exchange.hasProperties() ? exchange.getProperty(Exchange.AGGREGATED_TIMEOUT, 0, long.class) : 0;
+            long timeout = exchange.hasProperties() ? exchange.getProperty(Exchange.AGGREGATED_TIMEOUT, 0L, long.class) : 0L;
             if (timeout > 0) {
                 if (LOG.isTraceEnabled()) {
                     LOG.trace("Restoring CompletionTimeout for exchangeId: {} with timeout: {} millis.", exchange.getExchangeId(), timeout);