mirror of
https://github.com/square/okhttp.git
synced 2025-08-07 12:42:57 +03:00
Convert SAM (#6828)
This commit is contained in:
@@ -253,11 +253,9 @@ class OkHttpClientTestRule : BeforeEachCallback, AfterEachCallback {
|
||||
* A network that resolves only one IP address per host. Use this when testing route selection
|
||||
* fallbacks to prevent the host machine's various IP addresses from interfering.
|
||||
*/
|
||||
private val SINGLE_INET_ADDRESS_DNS = object : Dns {
|
||||
override fun lookup(hostname: String): List<InetAddress> {
|
||||
val addresses = Dns.SYSTEM.lookup(hostname)
|
||||
return listOf(addresses[0])
|
||||
}
|
||||
private val SINGLE_INET_ADDRESS_DNS = Dns { hostname ->
|
||||
val addresses = Dns.SYSTEM.lookup(hostname)
|
||||
listOf(addresses[0])
|
||||
}
|
||||
|
||||
private operator fun Throwable?.plus(throwable: Throwable): Throwable {
|
||||
|
Reference in New Issue
Block a user