react-native
                                
                                 react-native copied to clipboard
                                
                                    react-native copied to clipboard
                            
                            
                            
                        Remove okhttp internal util usage
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
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
just added the IOException catch block here, I think it should be enough to silence the exception as Source only throws IOException. Any thoughts @javache @cortinico?
just added the
IOExceptioncatch block here, I think it should be enough to silence the exception asSourceonly throwsIOException. Any thoughts @javache @cortinico?
I would suggest you just copy over the same code as closeQuietly (I would also add a comment to where the code was vendored from).
You're right that close only fires IOException but, as users might swap different Java & OkHTTP version, the exception types could differ in the future.
/rebase
| Platform | Engine | Arch | Size (bytes) | Diff | 
|---|---|---|---|---|
| android | hermes | arm64-v8a | 8,757,538 | -146 | 
| android | hermes | armeabi-v7a | 8,070,118 | -140 | 
| android | hermes | x86 | 9,250,139 | -142 | 
| android | hermes | x86_64 | 9,099,283 | -135 | 
| android | jsc | arm64-v8a | 9,318,912 | +80 | 
| android | jsc | armeabi-v7a | 8,508,818 | +78 | 
| android | jsc | x86 | 9,382,411 | +91 | 
| android | jsc | x86_64 | 9,635,644 | +76 | 
Base commit: 8c9e37561f56d50a9f7bbd6d67eeab3f85c3a66e Branch: main
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@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 facebook/react-native@3e3032636dc90a21a499492dcb88f819bcf4f003.