Perf improvement
This commit is contained in:
@@ -548,7 +548,7 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
|
|||||||
if (logger.isDebugEnabled() && !(input instanceof Publisher)) {
|
if (logger.isDebugEnabled() && !(input instanceof Publisher)) {
|
||||||
logger.debug("Invoking function " + this);
|
logger.debug("Invoking function " + this);
|
||||||
}
|
}
|
||||||
Object result = this.doApply(input);
|
Object result = (this.getTarget() instanceof PassThruFunction) ? input : this.doApply(input);
|
||||||
|
|
||||||
if (result != null && this.outputType != null) {
|
if (result != null && this.outputType != null) {
|
||||||
result = this.convertOutputIfNecessary(result, this.outputType, this.expectedOutputContentType);
|
result = this.convertOutputIfNecessary(result, this.outputType, this.expectedOutputContentType);
|
||||||
@@ -1448,4 +1448,11 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
|
|||||||
return this.originalMessage;
|
return this.originalMessage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class PassThruFunction implements Function<Object, Object> {
|
||||||
|
@Override
|
||||||
|
public Object apply(Object t) {
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user