This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-4.4.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.4.x by this push:
new cd0b9481c17 [CAMEL-21493]camel-ref: should use
CamelContext.hasEndpoint but not CamelContext.getEndpoint to check existence of
an endpoint (#16410)
cd0b9481c17 is described below
commit cd0b9481c17b51c1d5efe2ae4c28e6770e7e5f98
Author: Freeman(Yue) Fang <[email protected]>
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 38c71bf07f2..fe995410cbd 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
@@ -77,8 +77,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);
}
}