Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #3822]Enhance thread handling of InterruptedException #4756

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

scwlkq
Copy link
Contributor

@scwlkq scwlkq commented Jan 23, 2024

Fixes #3822 .

Motivation

The throwing of the InterruptedException clears the interrupted state of the Thread, so if the exception is not handled properly the information that the thread was interrupted will be lost. Instead, InterruptedExceptions should either be rethrown - immediately or after cleaning up the method’s state - or the thread should be re-interrupted by calling Thread.interrupt().

Modifications

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

@mxsm mxsm changed the title Enhance thread handling of InterruptedException [ISSUE #3822]Enhance thread handling of InterruptedException Jan 23, 2024
@mxsm mxsm merged commit 506838e into apache:master Jan 23, 2024
9 checks passed
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.

[Enhancement] InterruptedExceptions should not be ignored in the code.[WebhookFileListener]
3 participants