1
0
mirror of https://github.com/square/okhttp.git synced 2025-08-07 12:42:57 +03:00

Upgrade Okio and some build dependencies

The new ktlint sorts imports which makes this diff large.

The new japicmp ignores 'final' modifier changes in final classes.

We adopt the Google style for checkstyle.xml.

Okio readByteString() now uses segments more aggressively, so we
need to mitigate that to avoid tracking those segments in a test.
This commit is contained in:
Jesse Wilson
2020-01-11 22:24:12 -05:00
parent 93efc26a15
commit c1d50e371f
146 changed files with 874 additions and 1095 deletions

View File

@@ -34,11 +34,5 @@ task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask, dependsOn: 'jar') {
txtOutputFile = file("$buildDir/reports/japi.txt")
ignoreMissingClasses = true
includeSynthetic = true
methodExcludes = [
// Became 'final' in 4.0.0:
'okhttp3.logging.HttpLoggingInterceptor#redactHeader(java.lang.String)',
'okhttp3.logging.HttpLoggingInterceptor#getLevel()',
'okhttp3.logging.HttpLoggingInterceptor#setLevel(okhttp3.logging.HttpLoggingInterceptor$Level)'
]
}
check.dependsOn(japicmp)

View File

@@ -15,6 +15,11 @@
*/
package okhttp3.logging
import java.io.IOException
import java.nio.charset.Charset
import java.nio.charset.StandardCharsets.UTF_8
import java.util.TreeSet
import java.util.concurrent.TimeUnit
import okhttp3.Headers
import okhttp3.Interceptor
import okhttp3.OkHttpClient
@@ -23,11 +28,6 @@ import okhttp3.internal.http.promisesBody
import okhttp3.internal.platform.Platform
import okio.Buffer
import okio.GzipSource
import java.io.IOException
import java.nio.charset.Charset
import java.nio.charset.StandardCharsets.UTF_8
import java.util.TreeSet
import java.util.concurrent.TimeUnit
/**
* An OkHttp interceptor which logs request and response information. Can be applied as an

View File

@@ -15,6 +15,11 @@
*/
package okhttp3.logging
import java.io.IOException
import java.net.InetAddress
import java.net.InetSocketAddress
import java.net.Proxy
import java.util.concurrent.TimeUnit
import okhttp3.Call
import okhttp3.Connection
import okhttp3.EventListener
@@ -24,11 +29,6 @@ import okhttp3.OkHttpClient
import okhttp3.Protocol
import okhttp3.Request
import okhttp3.Response
import java.io.IOException
import java.net.InetAddress
import java.net.InetSocketAddress
import java.net.Proxy
import java.util.concurrent.TimeUnit
/**
* An OkHttp EventListener, which logs call events. Can be applied as an

View File

@@ -15,8 +15,8 @@
*/
package okhttp3.logging
import okio.Buffer
import java.io.EOFException
import okio.Buffer
/**
* Returns true if the body in question probably contains human readable text. Uses a small