-
Notifications
You must be signed in to change notification settings - Fork 135
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
base: develop
Are you sure you want to change the base?
Conversation
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.") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should link https://www.ibm.com/developerworks/java/library/j-jtp05236/index.html (Brian Goetz)
There was a problem hiding this comment.
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.
36219e5
to
0ceeece
Compare
ad6cd89
to
c8c8817
Compare
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. |
bad robot. |
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. |
long-lived -- on my list to come back to this. It will be both incredibly valuable and tricky to get right. |
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 callThread.currentThread().interrupt()
.==COMMIT_MSG==