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 2024/01/08 16:10:23 UTC

(camel) 01/06: CAMEL-20297 camel-file-watch: do not swallow interrupted exceptions

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 b00051f5f7c94feaffe800ed1184e2412e5ece5a
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Jan 5 10:35:06 2024 +0100

    CAMEL-20297 camel-file-watch: do not swallow interrupted exceptions
---
 .../java/org/apache/camel/component/file/watch/FileWatchConsumer.java    | 1 +
 1 file changed, 1 insertion(+)

diff --git a/components/camel-file-watch/src/main/java/org/apache/camel/component/file/watch/FileWatchConsumer.java b/components/camel-file-watch/src/main/java/org/apache/camel/component/file/watch/FileWatchConsumer.java
index d548f16543d..111f51e8c48 100644
--- a/components/camel-file-watch/src/main/java/org/apache/camel/component/file/watch/FileWatchConsumer.java
+++ b/components/camel-file-watch/src/main/java/org/apache/camel/component/file/watch/FileWatchConsumer.java
@@ -244,6 +244,7 @@ public class FileWatchConsumer extends DefaultConsumer {
                 try {
                     event = eventQueue.poll(1000, TimeUnit.MILLISECONDS);
                 } catch (InterruptedException e) {
+                    Thread.currentThread().interrupt();
                     return;
                 }