INT-4234: Fix LambdaMessageProcessor logic

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

When the actual argument type is `Message` there is no reason to go down the `if...else` logic.
This doesn't work for Lambda anyway because of generics erasure in case of `GenericTransformer`, but that is the fix for case of direct interface implementation
This commit is contained in:
Artem Bilan
2017-02-24 15:37:17 -05:00
committed by Gary Russell
parent 8cdcd14d35
commit 695b168b0b
2 changed files with 25 additions and 2 deletions

View File

@@ -99,7 +99,7 @@ public class LambdaMessageProcessor implements MessageProcessor<Object>, BeanFac
if (Message.class.isAssignableFrom(parameterType)) {
args[i] = message;
}
if (Map.class.isAssignableFrom(parameterType)) {
else if (Map.class.isAssignableFrom(parameterType)) {
if (message.getPayload() instanceof Map) {
args[i] = message.getPayload();
}