This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit d6df1fd26f095830dab59684453fd3a574e74b26 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Thu Oct 14 07:34:14 2021 +0200 CAMEL-17079: Deprecate SimpleBuilder and migrate to not use it anymore. --- .../camel/builder/endpoint/EndpointBuilderFactory.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java index c447925..dd07f1a 100644 --- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java +++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java @@ -373,14 +373,21 @@ public interface EndpointBuilderFactory default org.apache.camel.Expression endpoints( org.apache.camel.builder.EndpointProducerBuilder... endpoints) { return new org.apache.camel.support.ExpressionAdapter() { - List<org.apache.camel.Expression> expressions = Stream.of(endpoints) - .map(org.apache.camel.builder.EndpointProducerBuilder::expr) - .collect(Collectors.toList()); + + private List<org.apache.camel.Expression> expressions = null; @Override public Object evaluate(org.apache.camel.Exchange exchange) { return expressions.stream().map(e -> e.evaluate(exchange, Object.class)).collect(Collectors.toList()); } + + @Override + public void init(org.apache.camel.CamelContext context) { + super.init(context); + expressions = Stream.of(endpoints) + .map(epb -> epb.expr(context)) + .collect(Collectors.toList()); + } }; } }