Add support for handling Supplier to FunctionAroundWrapper

This commit is contained in:
Oleg Zhurakousky
2021-06-17 10:42:39 +02:00
parent ae8062efb1
commit 293ccd7425

View File

@@ -40,6 +40,9 @@ public abstract class FunctionAroundWrapper implements BiFunction<Object, Functi
if (input instanceof Message) {
return this.doApply((Message<byte[]>) input, targetFunction);
}
else if (targetFunction.isSupplier()) {
return this.doApply(null, targetFunction);
}
return targetFunction.apply(input);
}