Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve runtime compatibility with kotlin 1.5.31 (#7343)
* Revert "Remove usage of toDuration() (#7329)" This reverts commit 2c93710, as it doesn't actually solve the problem it was intending to solve. * Make jvm functions compatible with kotlin 1.5 runtime Based on the discovery in #7329 (comment) this commit tries a different approach to make okhttp compatible with the kotlin 1.5 runtime. Specifically, it converts the DurationUnit instance to a java.util.concurrent.TimeUnit instance and uses the existing codepath to handle it. The conversion must be done without using `DurationUnit.toTimeUnit()` since that is again a function that would not exist in the 1.5 kotlin runtime environment.
- Loading branch information
Showing
2 changed files
with
17 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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