* Simplify functionalTracingEnabled variable logic
* Add `BeanFactoryAwareFunctionRegistryTests.testWrappedWithAroundAdviseNotMessageReturnConfiguration()` to verify that non-Message return from the target function is wrapped to the `Message` before return to the `FunctionAroundWrapper`
This commit is contained in:
committed by
Oleg Zhurakousky
parent
80305e630b
commit
49e027a0ee
@@ -38,9 +38,8 @@ public abstract class FunctionAroundWrapper implements BiFunction<Object, Functi
|
||||
|
||||
@Override
|
||||
public final Object apply(Object input, FunctionInvocationWrapper targetFunction) {
|
||||
String functionalTracingEnabledStr = System.getProperty("spring.sleuth.function.enabled");
|
||||
boolean functionalTracingEnabled =
|
||||
!StringUtils.hasText(functionalTracingEnabledStr) || Boolean.parseBoolean(functionalTracingEnabledStr);
|
||||
String functionalTracingEnabledStr = System.getProperty("spring.sleuth.function.enabled", "true");
|
||||
boolean functionalTracingEnabled = Boolean.parseBoolean(functionalTracingEnabledStr);
|
||||
if (functionalTracingEnabled) {
|
||||
return this.doApply(input, targetFunction);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user