diff --git a/spring-cloud-function-context/src/main/java/org/springframework/cloud/function/context/catalog/FunctionTypeUtils.java b/spring-cloud-function-context/src/main/java/org/springframework/cloud/function/context/catalog/FunctionTypeUtils.java index d25d985f4..b4ca09b95 100644 --- a/spring-cloud-function-context/src/main/java/org/springframework/cloud/function/context/catalog/FunctionTypeUtils.java +++ b/spring-cloud-function-context/src/main/java/org/springframework/cloud/function/context/catalog/FunctionTypeUtils.java @@ -24,7 +24,6 @@ import java.util.Collection; import java.util.List; import java.util.Map; -import java.util.concurrent.atomic.AtomicReference; import java.util.function.BiConsumer; import java.util.function.BiFunction; import java.util.function.Consumer; @@ -195,7 +194,7 @@ public static Type discoverFunctionTypeFromClass(Class functionalClass) { if (Function1.class.isAssignableFrom(functionalClass)) { try { return TypeResolver.reify(Function1.class, (Class>) functionalClass); - } + } catch (Exception e) { return discoverFunctionTypeFromFunctionMethod(discoverFunctionalMethod(functionalClass)); }