Simple refactor: function is always null, see l121

Resolves #934
This commit is contained in:
Neokeld
2022-10-10 16:22:17 +02:00
committed by Oleg Zhurakousky
parent b89952c2cb
commit 47f3964435

View File

@@ -160,7 +160,6 @@ public class RoutingFunction implements Function<Object, Object> {
} }
} }
else if (input instanceof Publisher) { else if (input instanceof Publisher) {
if (function == null) {
if (StringUtils.hasText(functionProperties.getDefinition())) { if (StringUtils.hasText(functionProperties.getDefinition())) {
function = functionFromDefinition(functionProperties.getDefinition()); function = functionFromDefinition(functionProperties.getDefinition());
} }
@@ -173,7 +172,6 @@ public class RoutingFunction implements Function<Object, Object> {
: Flux.from((Publisher<?>) input).map(v -> route(v, originalInputIsPublisher)); : Flux.from((Publisher<?>) input).map(v -> route(v, originalInputIsPublisher));
} }
} }
}
else { else {
this.assertOriginalInputIsNotPublisher(originalInputIsPublisher); this.assertOriginalInputIsNotPublisher(originalInputIsPublisher);
if (StringUtils.hasText(functionProperties.getRoutingExpression())) { if (StringUtils.hasText(functionProperties.getRoutingExpression())) {