This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-3.7.x in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.7.x by this push: new 2bb3bb3 CAMEL-16161: Route template does not support autoStartup 2bb3bb3 is described below commit 2bb3bb360255167c4ea65250a4a625b85479b105 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Mon Feb 8 09:11:24 2021 +0100 CAMEL-16161: Route template does not support autoStartup --- .../java/org/apache/camel/model/RouteTemplateDefinition.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateDefinition.java index e799ed9..71094e6 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateDefinition.java @@ -185,11 +185,14 @@ public class RouteTemplateDefinition extends OptionalIdentifiedDefinition { public RouteDefinition asRouteDefinition() { RouteDefinition copy = new RouteDefinition(); - // do not copy id as it is used for route template id + // must set these first in this order + copy.setErrorHandlerRef(route.getErrorHandlerRef()); + copy.setErrorHandlerFactory(route.getErrorHandlerFactory()); + + // and then copy over the rest + // (do not copy id as it is used for route template id) copy.setAutoStartup(route.getAutoStartup()); copy.setDelayer(route.getDelayer()); - copy.setErrorHandlerFactory(route.getErrorHandlerFactory()); - copy.setErrorHandlerRef(route.getErrorHandlerRef()); copy.setGroup(route.getGroup()); copy.setInheritErrorHandler(route.isInheritErrorHandler()); copy.setInput(route.getInput());