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


The following commit(s) were added to refs/heads/main by this push:
     new 0b5abd0b14c [CAMEL-21493]camel-ref: should use 
CamelContext.hasEndpoint but not CamelContext.getEndpoint to check existence of 
an endpoint (#16410)
0b5abd0b14c is described below

commit 0b5abd0b14c91b9fd3e1b780b7a7f2092a95c2f7
Author: Freeman(Yue) Fang <freeman.f...@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);
             }
         }

Reply via email to