You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by fm...@apache.org on 2024/03/20 14:27:34 UTC

(camel) branch camel-4.4.x updated: Avoid rest routes dupes

This is an automated email from the ASF dual-hosted git repository.

fmariani 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 1043ec1ab15 Avoid rest routes dupes
1043ec1ab15 is described below

commit 1043ec1ab15410a46800758acb9c8447ef39f9d4
Author: Croway <fe...@gmail.com>
AuthorDate: Fri Mar 15 17:41:12 2024 +0100

    Avoid rest routes dupes
---
 .../java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
index 020b03f8f3b..27dbd15420a 100644
--- a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
+++ b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
@@ -538,7 +538,7 @@ public abstract class AbstractCamelContextFactoryBean<T extends ModelCamelContex
             }
 
             // add each rest as route
-            for (RestDefinition rest : getContext().getRestDefinitions()) {
+            for (RestDefinition rest : getRests()) {
                 rest.asRouteDefinition(getContext()).forEach(r -> getRoutes().add(r));
             }