Quick fix in the logic to determine 'composed' flag

This commit is contained in:
Oleg Zhurakousky
2019-12-05 21:38:37 +01:00
parent fde045a7c7
commit 8fac135937

View File

@@ -449,9 +449,11 @@ public class BeanFactoryAwareFunctionRegistry
FunctionInvocationWrapper(Object target, Type functionType, String functionDefinition, String... acceptedOutputMimeTypes) {
this.target = target;
this.composed = !target.getClass().getName().contains("$$EnhancerBySpringCGLIB")
this.composed = target instanceof RoutingFunction ||
(!target.getClass().getName().contains("$$EnhancerBySpringCGLIB")
&& !AopUtils.isAopProxy(target) && !AopUtils.isJdkDynamicProxy(target)
&& target.getClass().getDeclaredFields().length > 1;
&& target.getClass().getDeclaredFields().length > 1
&& target.getClass().isSynthetic());
this.functionType = functionType;
this.acceptedOutputMimeTypes = acceptedOutputMimeTypes;
this.functionDefinition = functionDefinition;