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/22 09:41:32 UTC

(camel) branch main updated (d9e8e246833 -> b38f1526d8f)

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

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


    from d9e8e246833 Bump jooq-version from 3.19.2 to 3.19.3 (#12853)
     new b301fa6e557 CAMEL-20297 camel-etcd3: do not swallow interrupted exceptions
     new 5a035215d0e CAMEL-20297 camel-stream: do not swallow interrupted exceptions
     new b38f1526d8f CAMEL-20297 camel-undertow: do not swallow interrupted exceptions

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../etcd3/processor/aggregate/Etcd3AggregationRepository.java    | 9 ++++++++-
 .../org/apache/camel/component/stream/FileWatcherStrategy.java   | 1 +
 .../java/org/apache/camel/component/stream/StreamConsumer.java   | 2 +-
 .../apache/camel/component/undertow/UndertowClientCallback.java  | 1 +
 4 files changed, 11 insertions(+), 2 deletions(-)


(camel) 02/03: CAMEL-20297 camel-stream: do not swallow interrupted exceptions

Posted by or...@apache.org.
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 5a035215d0ea245abc1a7b7a4d7d32f5c991d1f4
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Jan 19 11:02:08 2024 +0100

    CAMEL-20297 camel-stream: do not swallow interrupted exceptions
---
 .../java/org/apache/camel/component/stream/FileWatcherStrategy.java     | 1 +
 .../src/main/java/org/apache/camel/component/stream/StreamConsumer.java | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/components/camel-stream/src/main/java/org/apache/camel/component/stream/FileWatcherStrategy.java b/components/camel-stream/src/main/java/org/apache/camel/component/stream/FileWatcherStrategy.java
index 02f8b2b623d..25582e57d95 100644
--- a/components/camel-stream/src/main/java/org/apache/camel/component/stream/FileWatcherStrategy.java
+++ b/components/camel-stream/src/main/java/org/apache/camel/component/stream/FileWatcherStrategy.java
@@ -194,6 +194,7 @@ public class FileWatcherStrategy extends ServiceSupport implements CamelContextA
                     // wait for a key to be available
                     key = watcher.poll(pollTimeout, TimeUnit.MILLISECONDS);
                 } catch (InterruptedException ex) {
+                    Thread.currentThread().interrupt();
                     break;
                 }
 
diff --git a/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamConsumer.java b/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamConsumer.java
index 0c766e1b400..3ab6db20563 100644
--- a/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamConsumer.java
+++ b/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamConsumer.java
@@ -134,7 +134,7 @@ public class StreamConsumer extends DefaultConsumer implements Runnable {
                 readFromStreamRawMode();
             }
         } catch (InterruptedException e) {
-            // we are closing down so ignore
+            Thread.currentThread().interrupt();
         } catch (Exception e) {
             getExceptionHandler().handleException(e);
         }


(camel) 01/03: CAMEL-20297 camel-etcd3: do not swallow interrupted exceptions

Posted by or...@apache.org.
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 b301fa6e557fe676ad02421f4bcdc9b98856e4cf
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Jan 19 11:00:02 2024 +0100

    CAMEL-20297 camel-etcd3: do not swallow interrupted exceptions
    
    Leftovers from bc4a7ec519806216445cc10e5d38c68d78a5f4c3
---
 .../etcd3/processor/aggregate/Etcd3AggregationRepository.java    | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/processor/aggregate/Etcd3AggregationRepository.java b/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/processor/aggregate/Etcd3AggregationRepository.java
index 2ee2f9fb0c1..83a3e661fd8 100644
--- a/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/processor/aggregate/Etcd3AggregationRepository.java
+++ b/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/processor/aggregate/Etcd3AggregationRepository.java
@@ -444,6 +444,9 @@ public class Etcd3AggregationRepository extends ServiceSupport
                     LOG.trace(
                             "Put an exchange with ID {} for key {} into a recoverable storage in a thread-safe manner.",
                             exchange.getExchangeId(), key);
+                } catch (InterruptedException e) {
+                    Thread.currentThread().interrupt();
+                    throw new RuntimeCamelException(e.getMessage(), e);
                 } catch (Exception exception) {
                     throw new RuntimeCamelException(exception.getMessage(), exception);
                 }
@@ -493,7 +496,11 @@ public class Etcd3AggregationRepository extends ServiceSupport
             Set<String> keys = new TreeSet<>();
             getResponse.getKvs().forEach(kv -> keys.add(new String(kv.getKey().getBytes())));
             scanned = Collections.unmodifiableSet(keys);
-        } catch (InterruptedException | ExecutionException e) {
+        } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+            LOG.error(e.getMessage(), e);
+            throw new RuntimeCamelException(e.getMessage(), e);
+        } catch (ExecutionException e) {
             LOG.error(e.getMessage(), e);
             throw new RuntimeCamelException(e.getMessage(), e);
         }


(camel) 03/03: CAMEL-20297 camel-undertow: do not swallow interrupted exceptions

Posted by or...@apache.org.
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 b38f1526d8fd679fe3dc37f9f199e9ca014fb1b6
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Jan 19 11:02:18 2024 +0100

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

diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowClientCallback.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowClientCallback.java
index 0b8eedafae9..0a7efc25ac7 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowClientCallback.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowClientCallback.java
@@ -146,6 +146,7 @@ class UndertowClientCallback implements ClientCallback<ClientConnection> {
             closables.putFirst(closeable);
         } catch (final InterruptedException e) {
             hasFailedWith(e);
+            Thread.currentThread().interrupt();
         }
     }