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
This commit is contained in:
Artem Bilan
2016-11-28 18:37:31 -05:00
parent d9e1584a80
commit 98da5b4471

View File

@@ -77,6 +77,7 @@ public class LambdaMessageProcessor implements MessageProcessor<Object>, 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;
}