RUMM-3051: Remove okhttp3.internal package usage#1288
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1288 +/- ##
===========================================
+ Coverage 81.85% 81.92% +0.06%
===========================================
Files 361 361
Lines 12835 12840 +5
Branches 2148 2149 +1
===========================================
+ Hits 10506 10518 +12
Misses 1665 1665
+ Partials 664 657 -7
|
| } | ||
| val contentType = body.contentType() | ||
| "$method•$url•$contentLength•$contentType" | ||
| // TODO RUMM-3062 It is possible that if requests are say GZIPed (as an example, or maybe |
There was a problem hiding this comment.
I thin you are missing something after as an example ?
There was a problem hiding this comment.
GZIP is an example :) I put the bracket at the wrong place, will update it.
| // -1 is valid return value for contentLength() call according to the docs and stands | ||
| // for "unknown" case. | ||
| // We need to have a more precise identification. | ||
| if (contentType != null || contentLength != 0L) { |
There was a problem hiding this comment.
Aren't we worried that we will have too many collisions if we follow what you stated above ? I guess there are many apps there with GZIPed requests.
There was a problem hiding this comment.
No, this is the same behavior what we have right now (because EMPTY_REQUEST replace was the body with contentType == null and contentLength == 0), so we don't introduce any changes to the current behavior.
And later we can improve, this issue exists today as well.
5634563 to
b918b0b
Compare
What does this PR do?
Fixes #1282. This PR removes
okhttp3.internalpackage usage, we were usingokhttp3.internal.Util.EMPTY_REQUEST.There is a warning about
okhttp3.internalpackage usage for OkHttp 4.x, but with OkHttp 4.x this usage didn't cause any problems - the class and field were still there.However, it seems things are finally moved for OkHttp 5.x (which is in alpha for now, changelog is here), so to be on the safe side we are getting rid of reference to
okhttp3.internal.Review checklist (to be filled by reviewers)