Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor OkHttpClient#xxxTimeout(...) to fix errorprone PreferJavaTim…
…eOverload in tests (#5797) * Fix errorprone PreferJavaTimeOverload in tests When compiling OkHttp, we have the warnings regarding PreferJavaTimeOverload. For example: ``` okhttp/okhttp/src/test/java/okhttp3/EventListenerTest.java:193: warning: [PreferJavaTimeOverload] Prefer using java.time-based APIs when available. Note that this checker does not and cannot guarantee that the overloads have equivalent semantics, but that is generally the case with overloaded methods. .readTimeout(250, TimeUnit.MILLISECONDS) ^ (see https://errorprone.info/bugpattern/PreferJavaTimeOverload) ``` To fix this, `java.time.Duration` API is used instead of `java.util.concurrent.TimeUnit` in tests. * refactor OkHttpClient timeout() methods
- Loading branch information
1 parent
ed2fbc6
commit 733a58a
Showing
9 changed files
with
57 additions
and
49 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
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
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
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
Oops, something went wrong.