camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: CAMEL-8213: Fixed potential NPE in agg strategy.
Date Fri, 09 Jan 2015 08:10:37 GMT
CAMEL-8213: Fixed potential NPE in agg strategy.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ad73ccec
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ad73ccec
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ad73ccec

Branch: refs/heads/camel-2.14.x
Commit: ad73ccec92bb5d96c61b0d783766b8940c278d0e
Parents: 34cd058
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Jan 8 21:18:25 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Jan 9 09:10:25 2015 +0100

----------------------------------------------------------------------
 .../processor/aggregate/UseOriginalAggregationStrategy.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ad73ccec/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java
b/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java
index d6b7059..764151f 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java
@@ -44,7 +44,11 @@ public class UseOriginalAggregationStrategy implements AggregationStrategy
{
         if (propagateException) {
             Exception exception = checkException(oldExchange, newExchange);
             if (exception != null) {
-                original.setException(exception);
+                if (original != null) {
+                    original.setException(exception);
+                } else {
+                    oldExchange.setException(exception);
+                }
             }
         }
         return original != null ? original : oldExchange;


Mime
View raw message