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 2023/04/17 09:59:45 UTC

[camel] 08/13: (chores) camel-spring: combined duplicated 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 44fc774e798acb7d17878342fc4487391e3bd6f6
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Apr 17 10:20:28 2023 +0200

    (chores) camel-spring: combined duplicated catch blocks
---
 .../org/apache/camel/spring/spi/ApplicationContextBeanRepository.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/components/camel-spring/src/main/java/org/apache/camel/spring/spi/ApplicationContextBeanRepository.java b/components/camel-spring/src/main/java/org/apache/camel/spring/spi/ApplicationContextBeanRepository.java
index d3804b4ca3e..95be7e1fcd9 100644
--- a/components/camel-spring/src/main/java/org/apache/camel/spring/spi/ApplicationContextBeanRepository.java
+++ b/components/camel-spring/src/main/java/org/apache/camel/spring/spi/ApplicationContextBeanRepository.java
@@ -46,9 +46,7 @@ public class ApplicationContextBeanRepository implements BeanRepository {
             } else {
                 return null;
             }
-        } catch (NoSuchBeanDefinitionException e) {
-            return null;
-        } catch (BeanNotOfRequiredTypeException e) {
+        } catch (NoSuchBeanDefinitionException | BeanNotOfRequiredTypeException e) {
             return null;
         }