This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch camel-main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git
commit de7fe1e4c8a7070ec9264777bc5c2e417af618cd Author: Otavio Rodolfo Piske <[email protected]> AuthorDate: Thu May 5 12:30:46 2022 +0200 Fix outdated error handler reference --- .../main/java/org/apache/camel/k/support/SourcesSupport.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/camel-k-core/support/src/main/java/org/apache/camel/k/support/SourcesSupport.java b/camel-k-core/support/src/main/java/org/apache/camel/k/support/SourcesSupport.java index 2fc4326b..0c62f72c 100644 --- a/camel-k-core/support/src/main/java/org/apache/camel/k/support/SourcesSupport.java +++ b/camel-k-core/support/src/main/java/org/apache/camel/k/support/SourcesSupport.java @@ -150,10 +150,9 @@ public final class SourcesSupport { "There should not be any template definition when configuring error handler, got " + templates.size()); } - if (hasErrorHandlerBuilder(builder)) { - LOGGER.debug("Setting default error handler builder factory as {}", builder.getErrorHandlerBuilder()); - runtime.getCamelContext().adapt(ExtendedCamelContext.class).setErrorHandlerFactory(builder.getErrorHandlerBuilder()); - } + LOGGER.debug("Setting default error handler builder factory as {}", builder.getErrorHandlerFactory()); + runtime.getCamelContext().adapt(ExtendedCamelContext.class).setErrorHandlerFactory(builder.getErrorHandlerFactory()); + } }); break; @@ -175,10 +174,6 @@ public final class SourcesSupport { } } - static boolean hasErrorHandlerBuilder(RouteBuilder builder) { - return builder.hasErrorHandlerBuilder(); - } - public static void loadErrorHandlerSource(Runtime runtime, SourceDefinition errorHandlerSourceDefinition) { LOGGER.info("Loading error handler from: {}", errorHandlerSourceDefinition); load(runtime, Sources.fromDefinition(errorHandlerSourceDefinition));
