Add support for handling Supplier to FunctionAroundWrapper
This commit is contained in:
@@ -40,6 +40,9 @@ public abstract class FunctionAroundWrapper implements BiFunction<Object, Functi
|
|||||||
if (input instanceof Message) {
|
if (input instanceof Message) {
|
||||||
return this.doApply((Message<byte[]>) input, targetFunction);
|
return this.doApply((Message<byte[]>) input, targetFunction);
|
||||||
}
|
}
|
||||||
|
else if (targetFunction.isSupplier()) {
|
||||||
|
return this.doApply(null, targetFunction);
|
||||||
|
}
|
||||||
return targetFunction.apply(input);
|
return targetFunction.apply(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user