Skip to content

Preserve interrupt status when wrapping InterruptedException#1594

Closed
sohamgulame wants to merge 2 commits intoapache:masterfrom
sohamgulame:fix-uncheckedfuture-interrupt
Closed

Preserve interrupt status when wrapping InterruptedException#1594
sohamgulame wants to merge 2 commits intoapache:masterfrom
sohamgulame:fix-uncheckedfuture-interrupt

Conversation

@sohamgulame
Copy link

UncheckedFutureImpl currently clears the thread interrupt status when catching
InterruptedException and wrapping it in UncheckedInterruptedException.

This PR restores the interrupt status by calling Thread.currentThread().interrupt()
before throwing the unchecked exception, in accordance with Java concurrency best
practices.

A unit test has been added to verify that the interrupt status is preserved.
All tests pass locally with the Maven build.

@garydgregory
Copy link
Member

-1: Please don't duplicate someone else's work in progress #1590 AND mix multiple unrelated topics in one PR. Closing.

@sohamgulame
Copy link
Author

Where i get the issues that are not in progress or not submitted

@garydgregory
Copy link
Member

Hello @sohamgulame
Just look at Jira and GitHub. Jira ticket are usually linked to a PR. Otherwise, look at the recent PRs.

@sohamgulame
Copy link
Author

sohamgulame commented Jan 31, 2026

Thanks for the feedback — understood.
I wasn’t aware that #1590 already covered the interrupt-handling change, and I agree these should not have been combined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants