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


The following commit(s) were added to refs/heads/main by this push:
     new b52f44d7d60 CAMEL-19770: cleanup remaining catches of Throwables in 
components (#11348)
b52f44d7d60 is described below

commit b52f44d7d60af8a8d9c9df7ca6c513a4a4518227
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Fri Sep 8 14:48:53 2023 +0200

    CAMEL-19770: cleanup remaining catches of Throwables in components (#11348)
    
    * camel-box
    * camel-zookeeper-master
    * camel-netty
    * camel-undertow
---
 .../java/org/apache/camel/component/box/BoxUsersManagerIT.java | 10 +++++-----
 .../org/apache/camel/component/netty/NettyRedeliveryTest.java  |  2 +-
 .../org/apache/camel/component/undertow/UndertowHttp2Test.java |  2 +-
 .../apache/camel/component/zookeepermaster/group/GroupIT.java  |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxUsersManagerIT.java
 
b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxUsersManagerIT.java
index d431c70567f..5cd592e9a78 100644
--- 
a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxUsersManagerIT.java
+++ 
b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxUsersManagerIT.java
@@ -81,7 +81,7 @@ public class BoxUsersManagerIT extends AbstractBoxITSupport {
             if (result != null) {
                 try {
                     testUser.deleteEmailAlias(result.getID());
-                } catch (Throwable t) {
+                } catch (Exception t) {
                 }
             }
         }
@@ -112,7 +112,7 @@ public class BoxUsersManagerIT extends AbstractBoxITSupport 
{
             if (result != null) {
                 try {
                     result.delete(false, true);
-                } catch (Throwable t) {
+                } catch (Exception t) {
                 }
             }
         }
@@ -153,7 +153,7 @@ public class BoxUsersManagerIT extends AbstractBoxITSupport 
{
             if (result != null) {
                 try {
                     result.delete(false, true);
-                } catch (Throwable t) {
+                } catch (Exception t) {
                 }
             }
         }
@@ -308,13 +308,13 @@ public class BoxUsersManagerIT extends 
AbstractBoxITSupport {
             if (user1 != null) {
                 try {
                     user1.getResource().delete(false, true);
-                } catch (Throwable t) {
+                } catch (Exception t) {
                 }
             }
             if (user2 != null) {
                 try {
                     user2.getResource().delete(false, true);
-                } catch (Throwable t) {
+                } catch (Exception t) {
                 }
             }
         }
diff --git 
a/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyRedeliveryTest.java
 
b/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyRedeliveryTest.java
index deb348e4b14..ddc5701ba76 100644
--- 
a/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyRedeliveryTest.java
+++ 
b/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyRedeliveryTest.java
@@ -210,7 +210,7 @@ public class NettyRedeliveryTest extends CamelTestSupport {
             try {
                 Thread.sleep(10);
                 socket.close();
-            } catch (Throwable e) {
+            } catch (Exception e) {
                 throw new RuntimeException(e);
             } finally {
                 try {
diff --git 
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowHttp2Test.java
 
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowHttp2Test.java
index 348644e1d43..e6e89be5f3b 100644
--- 
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowHttp2Test.java
+++ 
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowHttp2Test.java
@@ -47,7 +47,7 @@ public class UndertowHttp2Test extends BaseUndertowTest {
             assertEquals(200, resp.getStatus());
             assertEquals(HttpVersion.HTTP_2, resp.getVersion());
             assertEquals(RESPONSE, new String(resp.getContent()));
-        } catch (Throwable ex) {
+        } catch (Exception ex) {
             LOG.error(ex.getMessage(), ex);
             fail("HTTP2 endpoint not exposed!, maybe it's not supported?");
         }
diff --git 
a/components/camel-zookeeper-master/src/test/java/org/apache/camel/component/zookeepermaster/group/GroupIT.java
 
b/components/camel-zookeeper-master/src/test/java/org/apache/camel/component/zookeepermaster/group/GroupIT.java
index 90694ddc823..c5a62f4dc60 100644
--- 
a/components/camel-zookeeper-master/src/test/java/org/apache/camel/component/zookeepermaster/group/GroupIT.java
+++ 
b/components/camel-zookeeper-master/src/test/java/org/apache/camel/component/zookeepermaster/group/GroupIT.java
@@ -221,7 +221,7 @@ public class GroupIT {
 
             try {
                 deleteDirectory(dataDir.toFile());
-            } catch (Throwable e) {
+            } catch (Exception e) {
                 // ignore
             }
         }

Reply via email to