You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2019/09/06 06:53:50 UTC
[camel] 01/02: [CAMEL-13912] Remove access to the route when
reifying the error handlers
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit ee5b49fa1a327bcee09fae67f456c3c6ef7cc064
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Thu Aug 29 14:05:51 2019 +0200
[CAMEL-13912] Remove access to the route when reifying the error handlers
---
.../camel/reifier/errorhandler/ErrorHandlerReifier.java | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/core/camel-core/src/main/java/org/apache/camel/reifier/errorhandler/ErrorHandlerReifier.java b/core/camel-core/src/main/java/org/apache/camel/reifier/errorhandler/ErrorHandlerReifier.java
index 3b897e1..72d61bc 100644
--- a/core/camel-core/src/main/java/org/apache/camel/reifier/errorhandler/ErrorHandlerReifier.java
+++ b/core/camel-core/src/main/java/org/apache/camel/reifier/errorhandler/ErrorHandlerReifier.java
@@ -163,16 +163,7 @@ public abstract class ErrorHandlerReifier<T extends ErrorHandlerBuilderSupport>
// so we should use that one
if (!isErrorHandlerFactoryConfigured(ref)) {
// see if there has been configured a route builder on the route
- RouteDefinition route = (RouteDefinition)routeContext.getRoute();
- answer = route.getErrorHandlerFactory();
- if (answer == null && route.getErrorHandlerRef() != null) {
- answer = routeContext.lookup(route.getErrorHandlerRef(), ErrorHandlerBuilder.class);
- }
- if (answer == null) {
- // fallback to the default error handler if none configured on
- // the route
- answer = new DefaultErrorHandlerBuilder();
- }
+ answer = routeContext.getErrorHandlerFactory();
// check if its also a ref with no error handler configuration like
// me
if (answer instanceof ErrorHandlerBuilderRef) {