@W-21981288: OkHttp 5 upgrade — fix deprecated API usages#2878
Open
wmathurin wants to merge 1 commit intoforcedotcom:devfrom
Open
@W-21981288: OkHttp 5 upgrade — fix deprecated API usages#2878wmathurin wants to merge 1 commit intoforcedotcom:devfrom
wmathurin wants to merge 1 commit intoforcedotcom:devfrom
Conversation
- Remove TLS 1.1 from ConnectionSpec in HttpAccess (obsolete per RFC 8996) - Flip RequestBody.create() arg order from (MediaType, content) to (content, MediaType) in RestRequest, AILTNPublisher, FileRequests, SalesforceNetworkPlugin, and SalesforceNetReactBridge - Use MediaType.get() instead of MediaType.parse() for known-valid hardcoded strings
Generated by 🚫 Danger |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (75.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## dev #2878 +/- ##
============================================
+ Coverage 64.87% 65.59% +0.71%
- Complexity 2979 3024 +45
============================================
Files 223 223
Lines 17507 17629 +122
Branches 2497 2300 -197
============================================
+ Hits 11358 11563 +205
- Misses 4937 4988 +51
+ Partials 1212 1078 -134
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
4.12.0to5.3.2was done in PR @W-21471024: Update Compose Material 3 to v1.4.0 #2871 (@W-21471024, Compose Material 3 v1.4.0 update)Changes
HttpAccess.java: RemovedTlsVersion.TLS_1_1fromConnectionSpec— TLS 1.1 was deprecated by RFC 8996 in 2021 and unsupported on modern AndroidRestRequest.java: SwitchedMediaType.parse()→MediaType.get()for hardcoded strings; flippedRequestBody.create(MediaType, content)tocreate(content, MediaType)AILTNPublisher.java: FlippedRequestBody.create()arg orderFileRequests.java: FlippedRequestBody.create()arg order (2 occurrences)SalesforceNetworkPlugin.java: FlippedRequestBody.create()arg order (2 occurrences)SalesforceNetReactBridge.java: FlippedRequestBody.create()arg order (2 occurrences)Notes
MediaType.parse(mimeType)calls that take runtime user-supplied MIME type strings were intentionally left asparse()(returns null on invalid) rather than changed toget()(throws)RequestBody.create(MediaType, content)form is still present in OkHttp 5 for Java backward compat but is deprecatedTest plan
SalesforceSDK,SalesforceHybrid, andSalesforceReactlibrariesSalesforceSDKTestsuite (REST client, file upload, analytics publishing)