[ 
https://issues.apache.org/jira/browse/CAMEL-8213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-8213.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 2.13.4

> UseOriginalAggregationStrategy is suspicious to NullPointerException
> --------------------------------------------------------------------
>
>                 Key: CAMEL-8213
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8213
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.14.1
>            Reporter: Steffen Ryll
>            Assignee: Claus Ibsen
>            Priority: Trivial
>              Labels: nullpointerexception
>             Fix For: 2.13.4, 2.14.2, 2.15.0
>
>
> The default constructor of UseOriginalAggregationStrategy sets the final 
> field {{original}} to null.
> In one corner case, the {{aggregate}} will dereference this null pointer, as 
> no null-pointer check is made.
> {code}
>     public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
>         if (propagateException) {
>             Exception exception = checkException(oldExchange, newExchange);
>             if (exception != null) {
>                 original.setException(exception);
>             }
>         }
>         return original != null ? original : oldExchange;
>     }
> {code}
> This potential NPE should be fixed, maybe a unit test be added.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to