You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/10/19 07:17:14 UTC

[camel] 01/09: (chores) camel-base-engine: use standard check for exception type in catch blocks

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

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 867c80f6777c5118cfd4bc09edcb3133c0a3cdad
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Oct 18 16:39:14 2022 +0200

    (chores) camel-base-engine: use standard check for exception type in catch blocks
---
 .../main/java/org/apache/camel/impl/engine/AbstractCamelContext.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index 08e61128a85..d085b2b1798 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -872,10 +872,9 @@ public abstract class AbstractCamelContext extends BaseService
         try {
             uri = EndpointHelper.resolveEndpointUriPropertyPlaceholders(this, uri);
             return NormalizedUri.newNormalizedUri(uri, false);
+        } catch (ResolveEndpointFailedException e) {
+            throw e;
         } catch (Exception e) {
-            if (e instanceof ResolveEndpointFailedException) {
-                throw e;
-            }
             throw new ResolveEndpointFailedException(uri, e);
         }
     }