Re-enable FunctionAroundWrapper

This commit is contained in:
Oleg Zhurakousky
2021-07-28 11:26:23 +02:00
parent 166937cdab
commit eca03a49d8
3 changed files with 6 additions and 10 deletions

View File

@@ -37,12 +37,12 @@ public abstract class FunctionAroundWrapper implements BiFunction<Object, Functi
@SuppressWarnings("unchecked")
@Override
public final Object apply(Object input, FunctionInvocationWrapper targetFunction) {
// if (input instanceof Message) {
// return this.doApply((Message<byte[]>) input, targetFunction);
// }
// else if (targetFunction.isSupplier() && !targetFunction.isOutputTypePublisher()) {
// return this.doApply(null, targetFunction);
// }
if (input instanceof Message) {
return this.doApply((Message<byte[]>) input, targetFunction);
}
else if (targetFunction.isSupplier() && !targetFunction.isOutputTypePublisher()) {
return this.doApply(null, targetFunction);
}
return targetFunction.apply(input);
}