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

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


The following commit(s) were added to refs/heads/camel-4.8.x by this push:
     new 5e8ae87536b CAMEL-21376 - null pointer exception fix when the oldest 
exchange is null (on first aggregation there is only the new exchange) (#16093)
5e8ae87536b is described below

commit 5e8ae87536be86c603360ba31be9acdb447a48e0
Author: gregRzn <[email protected]>
AuthorDate: Sun Oct 27 12:31:05 2024 +0100

    CAMEL-21376 - null pointer exception fix when the oldest exchange is null 
(on first aggregation there is only the new exchange) (#16093)
    
    Co-authored-by: Rozanski, Grzegorz <[email protected]>
---
 .../camel/processor/aggregate/UseOriginalAggregationStrategy.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java
 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java
index 1169e71d760..17f4a95dd6c 100644
--- 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java
+++ 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java
@@ -74,7 +74,7 @@ public class UseOriginalAggregationStrategy implements 
AggregationStrategy {
             if (exception != null) {
                 if (original != null) {
                     original.setProperty(Exchange.EXCEPTION_CAUGHT, exception);
-                } else {
+                } else if (oldExchange != null) {
                     oldExchange.setProperty(Exchange.EXCEPTION_CAUGHT, 
exception);
                 }
             }

Reply via email to