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:
@@ -171,8 +171,6 @@ public final class FunctionTypeUtils {
|
|||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static Type discoverFunctionTypeFromClass(Class<?> functionalClass) {
|
public static Type discoverFunctionTypeFromClass(Class<?> functionalClass) {
|
||||||
Assert.isTrue(isFunctional(functionalClass), "Type must be one of Supplier, Function or Consumer");
|
|
||||||
|
|
||||||
if (Function.class.isAssignableFrom(functionalClass)) {
|
if (Function.class.isAssignableFrom(functionalClass)) {
|
||||||
for (Type superInterface : functionalClass.getGenericInterfaces()) {
|
for (Type superInterface : functionalClass.getGenericInterfaces()) {
|
||||||
if (superInterface != null && !superInterface.equals(Object.class)) {
|
if (superInterface != null && !superInterface.equals(Object.class)) {
|
||||||
|
|||||||
@@ -98,9 +98,6 @@ public class KotlinLambdaToFunctionAutoConfiguration {
|
|||||||
if (ObjectUtils.isEmpty(input)) {
|
if (ObjectUtils.isEmpty(input)) {
|
||||||
return this.invoke();
|
return this.invoke();
|
||||||
}
|
}
|
||||||
else if (ObjectUtils.isArray(input)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
return this.invoke(input);
|
return this.invoke(input);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user