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

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


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

commit 7d9f314381dd91798bce4255998d21ddd9ad8c9f
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