You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2024/11/29 16:59:29 UTC
(camel) branch camel-4.8.x updated: [CAMEL-21493]camel-ref: should use CamelContext.hasEndpoint but not CamelContext.getEndpoint to check existence of an endpoint (#16410)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-4.8.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.8.x by this push:
new 3acbc026354 [CAMEL-21493]camel-ref: should use CamelContext.hasEndpoint but not CamelContext.getEndpoint to check existence of an endpoint (#16410)
3acbc026354 is described below
commit 3acbc02635410b846db9290d478fe0e54f2ac7db
Author: Freeman(Yue) Fang <fr...@gmail.com>
AuthorDate: Fri Nov 29 11:58:53 2024 -0500
[CAMEL-21493]camel-ref: should use CamelContext.hasEndpoint but not CamelContext.getEndpoint to check existence of an endpoint (#16410)
---
.../src/main/java/org/apache/camel/component/ref/RefEndpoint.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/components/camel-ref/src/main/java/org/apache/camel/component/ref/RefEndpoint.java b/components/camel-ref/src/main/java/org/apache/camel/component/ref/RefEndpoint.java
index 02844edda42..cee8b5b83f0 100644
--- a/components/camel-ref/src/main/java/org/apache/camel/component/ref/RefEndpoint.java
+++ b/components/camel-ref/src/main/java/org/apache/camel/component/ref/RefEndpoint.java
@@ -82,8 +82,8 @@ public class RefEndpoint extends DefaultEndpoint implements DelegateEndpoint {
if (endpoint == null) {
// endpoint is mandatory
endpoint = CamelContextHelper.mandatoryLookup(getCamelContext(), name, Endpoint.class);
- if (getCamelContext().getEndpoint(getEndpoint().getEndpointUri()) == null
- || getCamelContext().getEndpoint(getEndpoint().getEndpointUri()) != endpoint) {
+ if (getCamelContext().hasEndpoint(getEndpoint().getEndpointUri()) == null
+ || getCamelContext().hasEndpoint(getEndpoint().getEndpointUri()) != endpoint) {
getCamelContext().addEndpoint(getEndpoint().getEndpointUri(), endpoint);
}
}