-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Remove okhttp internal util usage #37843
Conversation
Do we know if this has the same behaviour as before, where checked exceptions are ignored? https://github.com/square/okhttp/blob/8c8c3dbcfa91e28de2e13975ec414e07f153fde4/okhttp/src/commonMain/kotlin/okhttp3/internal/-UtilCommon.kt#LL282C1-L288C2 |
@@ -152,7 +151,7 @@ public void writeTo(BufferedSink sink) throws IOException { | |||
source = Okio.source(inputStream); | |||
sink.writeAll(source); | |||
} finally { | |||
Util.closeQuietly(source); | |||
source.close(); |
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.
Can we copy over the code of closeQuitely
, namely:
fun Closeable.closeQuietly() {
try {
close()
} catch (rethrown: RuntimeException) {
throw rethrown
} catch (_: Exception) {
}
}
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.
thanks for the suggestion, i’ll update it later
just added the |
I would suggest you just copy over the same code as You're right that close only fires |
/rebase |
135f5c8
to
7730b9d
Compare
Base commit: 8c9e375 |
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.
See my previous comment
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1 similar comment
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
thank you for reviewing @cortinico, any actionables from my side? |
Not for now, we'll be merging this internally. It can take up to a couple of days |
great, thanks! |
@cortinico merged this pull request in 3e30326. |
* main: (135 commits) translation auto-update for i18n/twilight.config.json on master Interop: Introduce Bridge proxy Remove okhttp internal util usage (facebook#37843) Update debian to fix CI while updating Node (facebook#37841) fix: foreground ripple crash on api < 23 (facebook#37901) Re-add the top level LICENSE file (facebook#37916) Deploy 0.209.0 to xplat (facebook#37921) Re-enable direct debugging with JSC on iOS 16.4+ (facebook#37914) add emitObjectProp in parser primitives (facebook#37904) Make React-utils its own pod (facebook#37659) feat: allow custom assignment of rootView to rootViewController (facebook#37873) Switch xplat prettier config to hermes plugin (facebook#37915) Set iOS AppState to inactive when app is launching (facebook#37690) Use `fileExists` in replace_hermes script (facebook#37911) (docs): fix license url (facebook#37909) Revert D46719890: Re-enable direct debugging with JSC on iOS 16.4+ Re-enable direct debugging with JSC on iOS 16.4+ (facebook#37874) Fix component type references in xplat (facebook#37903) Remove usage of passthroughAnimatedPropExplicitValues in ScrollViewStickyHeader (facebook#37867) test runtime lifecycle callback (facebook#37897) ...
Summary: Remove okhttp internal `Util` usage so it can be compatible with [okhttp 5.0.0 alpha](https://square.github.io/okhttp/changelogs/changelog/#version-500-alpha7). ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [ANDROID] [CHANGED] - Remove okhttp3 internal util usage Pull Request resolved: #37843 Test Plan: None, the implementation is based on okhttp internal util Reviewed By: NickGerleman Differential Revision: D46764363 Pulled By: cortinico fbshipit-source-id: e46770625f19057fa7374be15e92903d7966f880
Summary: Remove okhttp internal `Util` usage so it can be compatible with [okhttp 5.0.0 alpha](https://square.github.io/okhttp/changelogs/changelog/#version-500-alpha7). ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [ANDROID] [CHANGED] - Remove okhttp3 internal util usage Pull Request resolved: facebook#37843 Test Plan: None, the implementation is based on okhttp internal util Reviewed By: NickGerleman Differential Revision: D46764363 Pulled By: cortinico fbshipit-source-id: e46770625f19057fa7374be15e92903d7966f880
Summary:
Remove okhttp internal
Util
usage so it can be compatible with okhttp 5.0.0 alpha.Changelog:
[ANDROID] [CHANGED] - Remove okhttp3 internal util usage
Test Plan:
None, the implementation is based on okhttp internal util