From 98da5b447160eb6fbdc8fdbadfac903864d8ff08 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Mon, 28 Nov 2016 18:37:31 -0500 Subject: [PATCH] Restore `method.setAccessible(true)` in the `LMP` https://build.spring.io/browse/INT-MASTER-444/ Looks like we still need `method.setAccessible(true)` in the `LambdaMessageProcessor` even if method is `public`. I think the problem is because any Lambda is still **inline class**, so even if method is `public`, the class isn't --- .../integration/handler/LambdaMessageProcessor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/handler/LambdaMessageProcessor.java b/spring-integration-core/src/main/java/org/springframework/integration/handler/LambdaMessageProcessor.java index e5914fdd73..dd94340559 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/handler/LambdaMessageProcessor.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/handler/LambdaMessageProcessor.java @@ -77,6 +77,7 @@ public class LambdaMessageProcessor implements MessageProcessor, BeanFac "classes with single method - functional interface implementations."); this.method = methodValue.get(); + this.method.setAccessible(true); this.parameterTypes = this.method.getParameterTypes(); this.payloadType = payloadType != null ? TypeDescriptor.valueOf(payloadType) : null; }