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/12 14:46:28 UTC
(camel) branch main updated (d69bc3bdec5 -> a70b6106c11)
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 d69bc3bdec5 CAMEL-20334 - AWS S3 cloudevents data type does not set proper data Content-Type (#12776)
new 62f71e2ef10 CAMEL-20297 camel-google-pubsub: do not swallow interrupted exceptions
new 3f4ed208c68 CAMEL-20297 camel-google-hazelcast: do not swallow interrupted exceptions
new 9077f5a9efc CAMEL-20297 camel-kamelet: do not swallow interrupted exceptions
new f2348919e7f CAMEL-20297 camel-ftp: do not swallow interrupted exceptions
new 39680a3f6c0 CAMEL-20297 camel-splunk: do not swallow interrupted exceptions
new a70b6106c11 CAMEL-20297 camel-whatsapp: do not swallow interrupted exceptions
The 6 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:
.../java/org/apache/camel/component/file/remote/SftpOperations.java | 1 +
.../file/remote/strategy/SftpChangedExclusiveReadLockStrategy.java | 1 +
.../apache/camel/component/google/pubsub/GooglePubsubComponent.java | 3 +++
.../apache/camel/component/google/pubsub/GooglePubsubConsumer.java | 3 +++
.../camel/component/hazelcast/policy/HazelcastRoutePolicy.java | 2 +-
.../java/org/apache/camel/component/kamelet/KameletProducer.java | 5 +++++
.../org/apache/camel/component/splunk/SplunkConnectionFactory.java | 4 ++++
.../component/whatsapp/service/WhatsAppServiceRestAPIAdapter.java | 5 ++++-
8 files changed, 22 insertions(+), 2 deletions(-)
(camel) 02/06: CAMEL-20297 camel-google-hazelcast: 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 3f4ed208c681d2bde356e55e28301d820caa0da4
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Jan 12 10:49:07 2024 +0100
CAMEL-20297 camel-google-hazelcast: do not swallow interrupted exceptions
---
.../apache/camel/component/hazelcast/policy/HazelcastRoutePolicy.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/policy/HazelcastRoutePolicy.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/policy/HazelcastRoutePolicy.java
index bda0b7f1fbf..1a7eaa89502 100644
--- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/policy/HazelcastRoutePolicy.java
+++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/policy/HazelcastRoutePolicy.java
@@ -298,7 +298,7 @@ public class HazelcastRoutePolicy extends RoutePolicySupport implements CamelCon
tryLockTimeoutUnit.name());
}
} catch (InterruptedException e) {
- // ignore
+ Thread.currentThread().interrupt();
} catch (Exception e) {
getExceptionHandler().handleException(e);
} finally {
(camel) 04/06: CAMEL-20297 camel-ftp: 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 f2348919e7f1dfaa0d9d14212a90cddbf2df3e02
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Jan 12 10:49:28 2024 +0100
CAMEL-20297 camel-ftp: do not swallow interrupted exceptions
---
.../main/java/org/apache/camel/component/file/remote/SftpOperations.java | 1 +
.../file/remote/strategy/SftpChangedExclusiveReadLockStrategy.java | 1 +
2 files changed, 2 insertions(+)
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
index c03b97b8d16..ae993e7e80f 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
@@ -1197,6 +1197,7 @@ public class SftpOperations implements RemoteFileOperations<SftpRemoteFile> {
tmp.join(timeout);
message = "timeout: ";
} catch (java.lang.InterruptedException eee) {
+ Thread.currentThread().interrupt();
}
if (sockp[0] != null && sockp[0].isConnected()) {
socket = sockp[0];
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpChangedExclusiveReadLockStrategy.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpChangedExclusiveReadLockStrategy.java
index 76564696baa..b21d6aa77d7 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpChangedExclusiveReadLockStrategy.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpChangedExclusiveReadLockStrategy.java
@@ -153,6 +153,7 @@ public class SftpChangedExclusiveReadLockStrategy implements GenericFileExclusiv
Thread.sleep(checkInterval);
return false;
} catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
LOG.debug("Sleep interrupted while waiting for exclusive read lock, so breaking out");
return true;
}
(camel) 05/06: CAMEL-20297 camel-splunk: 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 39680a3f6c0c04f0579d3b2c88295e6652f56055
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Jan 12 10:49:37 2024 +0100
CAMEL-20297 camel-splunk: do not swallow interrupted exceptions
---
.../org/apache/camel/component/splunk/SplunkConnectionFactory.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkConnectionFactory.java b/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkConnectionFactory.java
index faeccc89eac..dcd7ca630bf 100644
--- a/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkConnectionFactory.java
+++ b/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkConnectionFactory.java
@@ -168,6 +168,10 @@ public class SplunkConnectionFactory {
}
LOG.info("Successfully connected to Splunk");
return service;
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new RuntimeException(
+ String.format("could not connect to Splunk Server @ %s:%d - %s", host, port, e.getMessage()), e);
} catch (Exception e) {
throw new RuntimeException(
String.format("could not connect to Splunk Server @ %s:%d - %s", host, port, e.getMessage()), e);
(camel) 06/06: CAMEL-20297 camel-whatsapp: 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 a70b6106c11269335643b60dc4ab7ed3da10b1e8
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Jan 12 10:49:45 2024 +0100
CAMEL-20297 camel-whatsapp: do not swallow interrupted exceptions
---
.../component/whatsapp/service/WhatsAppServiceRestAPIAdapter.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/components/camel-whatsapp/src/main/java/org/apache/camel/component/whatsapp/service/WhatsAppServiceRestAPIAdapter.java b/components/camel-whatsapp/src/main/java/org/apache/camel/component/whatsapp/service/WhatsAppServiceRestAPIAdapter.java
index ef6d748f3a2..20bcb62d1b8 100644
--- a/components/camel-whatsapp/src/main/java/org/apache/camel/component/whatsapp/service/WhatsAppServiceRestAPIAdapter.java
+++ b/components/camel-whatsapp/src/main/java/org/apache/camel/component/whatsapp/service/WhatsAppServiceRestAPIAdapter.java
@@ -99,7 +99,10 @@ public class WhatsAppServiceRestAPIAdapter implements WhatsAppService {
try {
handler.sendMessage(exchange, callback, message, authorizationToken);
- } catch (IOException | InterruptedException e) {
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new RuntimeCamelException("Could not send message " + message, e);
+ } catch (IOException e) {
throw new RuntimeCamelException("Could not send message " + message, e);
}
}
(camel) 01/06: CAMEL-20297 camel-google-pubsub: 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 62f71e2ef108674f5af48a293e5d9f8736a24d85
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Jan 12 10:48:54 2024 +0100
CAMEL-20297 camel-google-pubsub: do not swallow interrupted exceptions
---
.../apache/camel/component/google/pubsub/GooglePubsubComponent.java | 3 +++
.../org/apache/camel/component/google/pubsub/GooglePubsubConsumer.java | 3 +++
2 files changed, 6 insertions(+)
diff --git a/components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubComponent.java b/components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubComponent.java
index 57ca6ff825e..2dcb1ddfb34 100644
--- a/components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubComponent.java
+++ b/components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubComponent.java
@@ -107,6 +107,9 @@ public class GooglePubsubComponent extends DefaultComponent {
publisher.shutdown();
try {
publisher.awaitTermination(publisherTerminationTimeout, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new RuntimeCamelException(e);
} catch (Exception e) {
throw new RuntimeCamelException(e);
}
diff --git a/components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubConsumer.java b/components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubConsumer.java
index 1d9d5012360..6a7172782b4 100644
--- a/components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubConsumer.java
+++ b/components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubConsumer.java
@@ -140,6 +140,9 @@ public class GooglePubsubConsumer extends DefaultConsumer {
}
localLog.debug("Exit run for subscription {}", subscriptionName);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ localLog.error("Failure getting messages from PubSub", e);
} catch (Exception e) {
localLog.error("Failure getting messages from PubSub", e);
}
(camel) 03/06: CAMEL-20297 camel-kamelet: 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 9077f5a9efc87c5ae7687385ee1273021f4415d8
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Jan 12 10:49:19 2024 +0100
CAMEL-20297 camel-kamelet: do not swallow interrupted exceptions
---
.../java/org/apache/camel/component/kamelet/KameletProducer.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java b/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java
index 8762f85561e..cc05702c5e8 100644
--- a/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java
+++ b/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java
@@ -112,6 +112,11 @@ final class KameletProducer extends DefaultAsyncProducer {
// kamelet producer that calls its kamelet consumer to process the incoming exchange
return consumer.getAsyncProcessor().process(exchange, callback);
}
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ exchange.setException(e);
+ callback.done(true);
+ return true;
} catch (Exception e) {
exchange.setException(e);
callback.done(true);