Clean up applicability of FunctionAroundWraapper
This commit is contained in:
@@ -40,8 +40,7 @@ public abstract class FunctionAroundWrapper implements BiFunction<Object, Functi
|
||||
String functionalTracingEnabledStr = System.getProperty("spring.sleuth.function.enabled");
|
||||
boolean functionalTracingEnabled = StringUtils.hasText(functionalTracingEnabledStr)
|
||||
? Boolean.parseBoolean(functionalTracingEnabledStr) : true;
|
||||
if (functionalTracingEnabled && !targetFunction.isInputTypePublisher() &&
|
||||
input instanceof Message && !FunctionTypeUtils.isCollectionOfMessage(targetFunction.getOutputType())) {
|
||||
if (functionalTracingEnabled && input instanceof Message) {
|
||||
boolean isSkipOutputConversion = targetFunction.isSkipOutputConversion();
|
||||
targetFunction.setSkipOutputConversion(true);
|
||||
try {
|
||||
|
||||
@@ -272,7 +272,8 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
|
||||
*/
|
||||
private FunctionInvocationWrapper wrapInAroundAdviceIfNecessary(FunctionInvocationWrapper function) {
|
||||
FunctionInvocationWrapper wrappedFunction = function;
|
||||
if (function != null && this.functionAroundWrapper != null) {
|
||||
if (function != null && this.functionAroundWrapper != null && !function.isSupplier()
|
||||
&& !function.isInputTypePublisher() && !function.isOutputTypePublisher() && !FunctionTypeUtils.isCollectionOfMessage(function.getOutputType())) {
|
||||
wrappedFunction = new FunctionInvocationWrapper(function) {
|
||||
@Override
|
||||
Object doApply(Object input) {
|
||||
|
||||
Reference in New Issue
Block a user