Consolidate isMessage() operation

This commit is contained in:
Oleg Zhurakousky
2020-10-19 14:57:55 +02:00
parent 14918ebf16
commit 10b1f808ba
7 changed files with 25 additions and 16 deletions

View File

@@ -36,6 +36,11 @@ public interface FunctionInspector {
FunctionRegistration<?> getRegistration(Object function);
/**
*
* @deprecated since 3.1 no longer used by the framework
*/
@Deprecated
default boolean isMessage(Object function) {
if (function == null) {
return false;

View File

@@ -191,9 +191,6 @@ public final class FunctionTypeUtils {
@SuppressWarnings("unchecked")
public static Type getInputType(Type functionType) {
assertSupportedTypes(functionType);
// if (isSupplier(functionType)) {
// return getOutputType(functionType, index);
// }
if (functionType instanceof Class) {
Class<?> functionClass = (Class<?>) functionType;
if (Function.class.isAssignableFrom(functionClass)) {
@@ -205,9 +202,6 @@ public final class FunctionTypeUtils {
else {
return null;
}
// else if (Supplier.class.isAssignableFrom(functionClass)) {
// functionType = TypeResolver.reify(Supplier.class, (Class<Supplier<?>>) functionClass);
// }
}
Type inputType = Object.class;