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 a9b194aa29379a9ea390e8cce743b504cbfa9a6f Author: Otavio Rodolfo Piske <angusyo...@gmail.com> AuthorDate: Fri Jun 23 14:39:38 2023 +0200 (chores) camel-file: do not catch Throwable --- .../org/apache/camel/component/file/GenericFilePollingConsumer.java | 3 --- .../org/apache/camel/component/file/cluster/FileLockClusterView.java | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFilePollingConsumer.java b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFilePollingConsumer.java index fdcbc6b57dd..1685f62575f 100644 --- a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFilePollingConsumer.java +++ b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFilePollingConsumer.java @@ -175,9 +175,6 @@ public class GenericFilePollingConsumer extends EventDrivenPollingConsumer { cause = t; done = true; } - } catch (Throwable t) { - cause = t; - done = true; } if (!done && timeout > 0) { diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/cluster/FileLockClusterView.java b/components/camel-file/src/main/java/org/apache/camel/component/file/cluster/FileLockClusterView.java index e9069aaf1d6..c5838417a0a 100644 --- a/components/camel-file/src/main/java/org/apache/camel/component/file/cluster/FileLockClusterView.java +++ b/components/camel-file/src/main/java/org/apache/camel/component/file/cluster/FileLockClusterView.java @@ -117,7 +117,7 @@ public class FileLockClusterView extends AbstractCamelClusterView { if (lockFile != null) { try { lockFile.close(); - } catch (Throwable ignore) { + } catch (Exception ignore) { // Ignore } lockFile = null;