camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steffen Ryll (JIRA)" <>
Subject [jira] [Created] (CAMEL-8213) UseOriginalAggregationStrategy is suspicious to NullPointerException
Date Wed, 07 Jan 2015 09:31:34 GMT
Steffen Ryll created CAMEL-8213:

             Summary: UseOriginalAggregationStrategy is suspicious to NullPointerException
                 Key: CAMEL-8213
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.14.1
            Reporter: Steffen Ryll
            Priority: Trivial

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.
    public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
        if (propagateException) {
            Exception exception = checkException(oldExchange, newExchange);
            if (exception != null) {
        return original != null ? original : oldExchange;

This potential NPE should be fixed, maybe a unit test be added.

This message was sent by Atlassian JIRA

View raw message