GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix: restore the thread's interrupted status after catching InterruptedException (#1005) by micheldavid · Pull Request #1006 · googleapis/google-http-java-client Conversation
Contributor
Fixes #1005
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
micheldavid
force-pushed
the
fixinterrupt
branch
from
908866f to
1ae169e
Compare
elharo
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could well be wrong here. I usually am when it comes to Thread arcana, but reading that article and the docs, this only seems necessary when you call
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
|
This might help with testing: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
1ae169e to
e3a2040
Compare
Mark thread as interrupted since we cannot throw InterruptedException here. - Also setting thread interrupted in HttpBackOffUnsuccessfulResponseHandler. - Added tests for both HttpBackOffIOExceptionHandler and HttpBackOffUnsuccessfulResponseHandler.
|
Rebased and added tests. I also re-interrupted the thread in I noticed HttpRequest is swallowing an InterruptedException too, but that code depends on BackOffPolicy which javadoc says is A bit more literature around interrupted exceptions: go/interrupted-exception (internal) and http://www.ibm.com/developerworks/java/library/j-jtp05236/index.html |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| try { | ||
| return BackOffUtils.next(sleeper, backOff); | ||
| } catch (InterruptedException exception) { | ||
| <<<<<<< HEAD |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
bad merge
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
oops... cant believe this got in here without me noticing.
fixed. ptal.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for the quick turn around. I see a lot of files I did not change are failing the code format lint pass. I did change some of them though. Should I fix it with "mvn com.coveo:fmt-maven-plugin:format"? Maybe fix only the ones I changed? I also do not have write access, so I will need someone to merge this in. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
yes, please run the plugin |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Now the linter is failing on the Failed to execute goal com.coveo:fmt-maven-plugin:2.10:check (default-cli) on project google-http-client-bom Is this normal? The same seems to happen in master. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Strange, I don't recall us running the code formatter on this repo. Looking into it |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
We can fix the linting issue separately. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks Jeff! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
🤖 I have created a release \*beep\* \*boop\* --- ## [1.36.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.35.0...v1.36.0) (2020-06-30) ### Features * add Android 19 compatible FileDataStoreFactory implementation ([#1070](https://www.github.com/googleapis/google-http-java-client/issues/1070)) ([1150acd](https://www.github.com/googleapis/google-http-java-client/commit/1150acd38aa3139eea4f2f718545c20d2493877e)) ### Bug Fixes * restore the thread's interrupted status after catching InterruptedException ([#1005](https://www.github.com/googleapis/google-http-java-client/issues/1005)) ([#1006](https://www.github.com/googleapis/google-http-java-client/issues/1006)) ([0a73a46](https://www.github.com/googleapis/google-http-java-client/commit/0a73a4628b6ec4420db6b9cdbcc68899f3807c5b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
HttpBackOffIOExceptionHandler and HttpBackOffUnsuccessfulResponseHandler do not restore the interrupted status after catching InterruptionException
There was an error while loading. Please reload this page.