Fix LambdaMessageProcessor for Map payload
JIRA: https://jira.spring.io/browse/INT-4478 When we use a `GenericHandler` and an incoming payload is a `Map`, we copy it into both arguments into the `Object` for the payload and `Map` for the headers. This way we lose headers in the target lambda * Check a size of arguments on the target lambda and don't set a payload into the `Map` argument if we have more than 1 arguments **Cherry-pick to 5.0.x**
This commit is contained in:
committed by
Gary Russell
parent
abfda64798
commit
4d2e00d6c8
@@ -100,7 +100,7 @@ public class LambdaMessageProcessor implements MessageProcessor<Object>, BeanFac
|
||||
args[i] = message;
|
||||
}
|
||||
else if (Map.class.isAssignableFrom(parameterType)) {
|
||||
if (message.getPayload() instanceof Map) {
|
||||
if (message.getPayload() instanceof Map && this.parameterTypes.length == 1) {
|
||||
args[i] = message.getPayload();
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user