You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Federico Mariani (Jira)" <ji...@apache.org> on 2026/10/21 13:33:00 UTC
[jira] [Commented] (CAMEL-25929) Restore interrupt status in InterruptedException catch blocks
[ https://issues.apache.org/jira/browse/CAMEL-25929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18129662#comment-18129662 ]
Federico Mariani commented on CAMEL-25929:
------------------------------------------
PR: https://github.com/apache/camel/pull/28245 (takes over https://github.com/apache/camel/pull/26871)
> 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
> Priority: Minor
>
> 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)