Details
-
Bug
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
2.14.1
Description
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) { original.setException(exception); } } return original != null ? original : oldExchange; }
This potential NPE should be fixed, maybe a unit test be added.