1
0
mirror of https://github.com/square/okhttp.git synced 2025-11-27 18:21:14 +03:00

Reorder the members of OkHttpClient (#5114)

This isn't perfect but I think it's a bit more logical.
This commit is contained in:
Jesse Wilson
2019-05-25 01:50:37 -04:00
committed by Yuri Schimke
parent 2a9ac09cf1
commit f87bb6d817
12 changed files with 420 additions and 428 deletions

View File

@@ -15,15 +15,14 @@
*/
package okhttp3
import okhttp3.internal.delimiterOffset
import okhttp3.internal.trimSubstring
import okhttp3.internal.cookieToString
import okhttp3.internal.delimiterOffset
import okhttp3.internal.platform.Platform
import okhttp3.internal.platform.Platform.Companion.WARN
import okhttp3.internal.trimSubstring
import java.io.IOException
import java.net.CookieHandler
import java.net.HttpCookie
import java.util.ArrayList
import java.util.Collections
/** A cookie jar that delegates to a [java.net.CookieHandler]. */
@@ -56,7 +55,7 @@ class JavaNetCookieJar(private val cookieHandler: CookieHandler) : CookieJar {
if (("Cookie".equals(key, ignoreCase = true) || "Cookie2".equals(key, ignoreCase = true)) &&
value.isNotEmpty()) {
for (header in value) {
if (cookies == null) cookies = ArrayList()
if (cookies == null) cookies = mutableListOf()
cookies.addAll(decodeHeaderAsJavaNetCookies(url, header))
}
}