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

Fix #1043: Interruption handling check #1076

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

carterkozak
Copy link
Contributor

Fix #1043

Currently using the ExceptionSpecificity base branch to avoid duplicating utility functionality.

==COMMIT_MSG==
error prone HandleInterruption to ensure users who catch InterruptedException also call Thread.currentThread().interrupt().
==COMMIT_MSG==

severity = BugPattern.SeverityLevel.WARNING,
summary = "InterruptedException must be handled by either rethrowing the InterruptedException or setting "
+ "Thread.currentThread().interrupt(). Failure to do so can result in retrial of long-running "
+ "operations that are expected to be terminated.")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to reference the // interruption reset suppression in the summary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iamdanfox I'm not sure we want to limit ourselves to cases that rethrow -- those are the most likely to do the right thing. The bad case is when InterruptedException is caught, the interrupted flag is not reset, and execution continues.

@carterkozak carterkozak force-pushed the ckozak/ExceptionSpecificity branch 2 times, most recently from 36219e5 to 0ceeece Compare December 3, 2019 12:46
@iamdanfox iamdanfox changed the base branch from ckozak/ExceptionSpecificity to develop December 9, 2019 18:02
@stale
Copy link

stale bot commented Dec 23, 2019

This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days.

@stale stale bot added the stale label Dec 23, 2019
@stale stale bot closed this Dec 30, 2019
@carterkozak
Copy link
Contributor Author

bad robot.

@carterkozak carterkozak reopened this Dec 30, 2019
@stale stale bot removed the stale label Dec 30, 2019
@stale
Copy link

stale bot commented Jan 13, 2020

This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days.

@stale stale bot added the stale label Jan 13, 2020
@carterkozak
Copy link
Contributor Author

long-lived -- on my list to come back to this. It will be both incredibly valuable and tricky to get right.

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

Successfully merging this pull request may close these issues.

FR: ensure users who catch InterruptedException also call Thread.currentThread().interrupt()
1 participant