Add "wrapper" type methods to FunctionInspector
These can be used to more reliably discover whether the user has declared a function with flux types or "bare" POJOs. They then pave the way to supporting single valued types in a special way. Also consolidate and simplify the logic in FunctionInspector
This commit is contained in:
@@ -60,7 +60,10 @@ public abstract class FunctionUtils {
|
||||
}
|
||||
String[] types = getParameterizedTypeNames(supplier, Supplier.class);
|
||||
if (ObjectUtils.isEmpty(types)) {
|
||||
return true;
|
||||
// Assume if there is no generic information then the function is not
|
||||
// expecting a flux. N.B. this isn't very accurate. It is better to use a
|
||||
// FunctionInspector if one is available.
|
||||
return false;
|
||||
}
|
||||
return (types[0].startsWith(FLUX_CLASS_NAME));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user