GH-1204 Polishing aftre refactoring of TypeTools
This commit is contained in:
@@ -121,7 +121,7 @@ public class FunctionRegistration<T> implements BeanNameAware {
|
||||
if (KotlinDetector.isKotlinPresent() && this.target instanceof KotlinLambdaToFunctionAutoConfiguration.KotlinFunctionWrapper) {
|
||||
return this;
|
||||
}
|
||||
Type discoveredFunctionType = FunctionTypeUtils.discoverFunctionTypeFromClass(this.target.getClass());
|
||||
Type discoveredFunctionType = type; //FunctionTypeUtils.discoverFunctionTypeFromClass(this.target.getClass());
|
||||
if (discoveredFunctionType == null) { // only valid for Kafka Stream KStream[] return type.
|
||||
return null;
|
||||
}
|
||||
@@ -146,7 +146,6 @@ public class FunctionRegistration<T> implements BeanNameAware {
|
||||
+ discoveredFunctionType + "; Provided: " + type);
|
||||
}
|
||||
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -180,6 +180,10 @@ public class BeanFactoryAwareFunctionRegistry extends SimpleFunctionRegistry imp
|
||||
else {
|
||||
functionType = FunctionTypeUtils.discoverFunctionType(functionCandidate, functionName, this.applicationContext);
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Discovered function type for: " + functionDefinition + " - " + functionType);
|
||||
}
|
||||
if (functionRegistration == null) {
|
||||
functionRegistration = new FunctionRegistration(functionCandidate, functionName).type(functionType);
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@ public final class FunctionTypeUtils {
|
||||
else {
|
||||
inputType = resolvableInputType.getType();
|
||||
}
|
||||
return inputType;
|
||||
return inputType instanceof TypeVariable ? Object.class : inputType;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@@ -465,7 +465,7 @@ public final class FunctionTypeUtils {
|
||||
else {
|
||||
outputType = resolvableOutputType.getType();
|
||||
}
|
||||
return outputType;
|
||||
return outputType instanceof TypeVariable ? Object.class : outputType;
|
||||
}
|
||||
|
||||
public static Type getImmediateGenericType(Type type, int index) {
|
||||
|
||||
Reference in New Issue
Block a user