INT-3908: Fix NPE in the AbstractAggrMGProcessor

JIRA: https://jira.spring.io/browse/INT-3908

**Cherry-pick to ALL**
This commit is contained in:
Artem Bilan
2015-12-11 17:48:52 -05:00
committed by Gary Russell
parent 4606954cd2
commit 88eb7894de

View File

@@ -74,8 +74,11 @@ public abstract class AbstractAggregatingMessageGroupProcessor implements Messag
if (!aggregatedHeaders.containsKey(key)) {
aggregatedHeaders.put(key, value);
}
else if (!value.equals(aggregatedHeaders.get(key))) {
conflictKeys.add(key);
else {
Object existingValue = aggregatedHeaders.get(key);
if (value != existingValue && (value == null || !value.equals(existingValue))) {
conflictKeys.add(key);
}
}
}
}