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/19 13:55:35 UTC

(camel) branch main updated: Avoid rest routes dupes

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

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

commit 930387aa7520c366ba71d8b5b5d24b1f3cc7ed6e
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));
             }