GH-918 Fix Kotlin function invocation

For some reason it contained code that was doing some special checking for array and was returning null.
Resolves #918
This commit is contained in:
Oleg Zhurakousky
2022-08-17 18:38:14 +02:00
parent 9e9c6d447f
commit 271e2d1bce
2 changed files with 0 additions and 5 deletions

View File

@@ -171,8 +171,6 @@ public final class FunctionTypeUtils {
@SuppressWarnings("unchecked")
public static Type discoverFunctionTypeFromClass(Class<?> functionalClass) {
Assert.isTrue(isFunctional(functionalClass), "Type must be one of Supplier, Function or Consumer");
if (Function.class.isAssignableFrom(functionalClass)) {
for (Type superInterface : functionalClass.getGenericInterfaces()) {
if (superInterface != null && !superInterface.equals(Object.class)) {

View File

@@ -98,9 +98,6 @@ public class KotlinLambdaToFunctionAutoConfiguration {
if (ObjectUtils.isEmpty(input)) {
return this.invoke();
}
else if (ObjectUtils.isArray(input)) {
return null;
}
else {
return this.invoke(input);
}