This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new ce49c18 CAMEL-14499: Optimize to avoid using camel-core-catalog for SendDynamicAware for camel-file/camel-ftp. ce49c18 is described below commit ce49c189814deff98d6b2fae3884da251b56d68e Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Sun Sep 27 15:42:26 2020 +0200 CAMEL-14499: Optimize to avoid using camel-core-catalog for SendDynamicAware for camel-file/camel-ftp. --- .../org/apache/camel/support/component/SendDynamicAwareSupport.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/camel-support/src/main/java/org/apache/camel/support/component/SendDynamicAwareSupport.java b/core/camel-support/src/main/java/org/apache/camel/support/component/SendDynamicAwareSupport.java index c68b303..c1f84b6 100644 --- a/core/camel-support/src/main/java/org/apache/camel/support/component/SendDynamicAwareSupport.java +++ b/core/camel-support/src/main/java/org/apache/camel/support/component/SendDynamicAwareSupport.java @@ -36,6 +36,7 @@ public abstract class SendDynamicAwareSupport extends ServiceSupport implements private CamelContext camelContext; private Set<String> knownProperties; + private RuntimeCamelCatalog catalog; private String scheme; @Override @@ -67,6 +68,8 @@ public abstract class SendDynamicAwareSupport extends ServiceSupport implements throw new IllegalStateException("Cannot find EndpointUriFactory for component: " + getScheme()); } knownProperties = factory.propertyNames(); + } else { + catalog = getCamelContext().adapt(ExtendedCamelContext.class).getRuntimeCamelCatalog(); } } @@ -87,7 +90,6 @@ public abstract class SendDynamicAwareSupport extends ServiceSupport implements properties = map; } } else { - RuntimeCamelCatalog catalog = exchange.getContext().adapt(ExtendedCamelContext.class).getRuntimeCamelCatalog(); properties = new LinkedHashMap<>(catalog.endpointProperties(uri)); } return properties; @@ -109,7 +111,6 @@ public abstract class SendDynamicAwareSupport extends ServiceSupport implements properties = map; } } else { - RuntimeCamelCatalog catalog = exchange.getContext().adapt(ExtendedCamelContext.class).getRuntimeCamelCatalog(); properties = new LinkedHashMap<>(catalog.endpointLenientProperties(uri)); } return properties; @@ -127,7 +128,6 @@ public abstract class SendDynamicAwareSupport extends ServiceSupport implements } return answer; } else { - RuntimeCamelCatalog catalog = exchange.getContext().adapt(ExtendedCamelContext.class).getRuntimeCamelCatalog(); return catalog.asEndpointUri(getScheme(), new LinkedHashMap(properties), false); } }