Federico Mariani created CAMEL-25929:
----------------------------------------
Summary: Restore interrupt status in InterruptedException catch
blocks
Key: CAMEL-25929
URL: https://issues.apache.org/jira/browse/CAMEL-25929
Project: Camel
Issue Type: Improvement
Components: camel-core
Reporter: Federico Mariani
Assignee: Federico Mariani
Some catch blocks swallow InterruptedException without restoring the thread
interrupt flag, so callers (thread pools, shutdown) cannot see the interrupt
(Sonar S2142).
Sites:
* camel-core-processor: ConcurrentRequestsThrottler - handleInterrupt() is
called without restoring the flag, unlike TotalRequestsThrottler
* camel-aws2-kinesis: KclKinesis2Consumer.doStop() graceful shutdown wait
* camel-tahu: TahuEdgeClient.shutdown() - InterruptedException must get its own
catch so that ExecutionException/CancellationException do not flag the thread
* camel-cli-debug: CamelCliDebuggerFactory
* camel-jbang-plugin-kubernetes: KubernetesPodLogs.sleepWell() - restore the
flag and stop the retry loop, otherwise later sleeps throw at once and the loop
retries with no backoff
The camel-smpp MessageReceiverListenerImpl sites are left as they are:
restoring the flag there and then running the route on the interrupted jsmpp
thread would make interruptible I/O in the route fail.
Originally contributed in https://github.com/apache/camel/pull/26871 by
TimurRakhmatullin86.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)