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

@@ -15,15 +15,15 @@
*/
package okhttp3
import java.net.InetAddress
import java.util.concurrent.TimeUnit
import java.util.logging.Logger
import okhttp3.internal.concurrent.TaskRunner
import okhttp3.testing.Flaky
import org.assertj.core.api.Assertions.assertThat
import org.junit.rules.TestRule
import org.junit.runner.Description
import org.junit.runners.model.Statement
import java.net.InetAddress
import java.util.concurrent.TimeUnit
import java.util.logging.Logger
/**
* Apply this rule to all tests. It adds additional checks for leaked resources and uncaught

View File

@@ -15,8 +15,6 @@
*/
package okhttp3
import okhttp3.internal.concurrent.TaskRunner
import okhttp3.internal.http2.Http2
import java.util.concurrent.CopyOnWriteArraySet
import java.util.logging.ConsoleHandler
import java.util.logging.Level
@@ -24,6 +22,8 @@ import java.util.logging.LogRecord
import java.util.logging.Logger
import java.util.logging.SimpleFormatter
import kotlin.reflect.KClass
import okhttp3.internal.concurrent.TaskRunner
import okhttp3.internal.http2.Http2
object OkHttpDebugLogging {
// Keep references to loggers to prevent their configuration from being GC'd.

View File

@@ -15,6 +15,13 @@
*/
package okhttp3
import java.io.IOException
import java.net.InetAddress
import java.net.InetSocketAddress
import java.net.Proxy
import java.util.Deque
import java.util.concurrent.ConcurrentLinkedDeque
import java.util.concurrent.TimeUnit
import okhttp3.CallEvent.CallEnd
import okhttp3.CallEvent.CallFailed
import okhttp3.CallEvent.CallStart
@@ -42,13 +49,6 @@ import okhttp3.CallEvent.SecureConnectStart
import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.data.Offset
import org.junit.Assert.assertTrue
import java.io.IOException
import java.net.InetAddress
import java.net.InetSocketAddress
import java.net.Proxy
import java.util.Deque
import java.util.concurrent.ConcurrentLinkedDeque
import java.util.concurrent.TimeUnit
open class RecordingEventListener : EventListener() {
val eventSequence: Deque<CallEvent> = ConcurrentLinkedDeque()

View File

@@ -15,12 +15,13 @@
*/
package okhttp3.testing
import com.amazon.corretto.crypto.provider.AmazonCorrettoCryptoProvider
import com.amazon.corretto.crypto.provider.SelfTestStatus
import java.security.Security
import okhttp3.internal.platform.ConscryptPlatform
import okhttp3.internal.platform.Jdk8WithJettyBootPlatform
import okhttp3.internal.platform.Jdk9Platform
import okhttp3.internal.platform.OpenJSSEPlatform
import com.amazon.corretto.crypto.provider.AmazonCorrettoCryptoProvider
import com.amazon.corretto.crypto.provider.SelfTestStatus
import okhttp3.internal.platform.Platform
import org.bouncycastle.jce.provider.BouncyCastleProvider
import org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
@@ -40,7 +41,6 @@ import org.junit.AssumptionViolatedException
import org.junit.rules.TestRule
import org.junit.runners.model.Statement
import org.openjsse.net.ssl.OpenJSSE
import java.security.Security
/**
* Marks a test as Platform aware, before the test runs a consistent Platform will be
@@ -380,4 +380,4 @@ open class PlatformRule @JvmOverloads constructor(
val isCorrettoInstalled: Boolean =
isCorrettoSupported && Security.getProviders().first().name == AmazonCorrettoCryptoProvider.PROVIDER_NAME
}
}
}

View File

@@ -26,4 +26,4 @@ object PlatformVersion {
fun getJvmSpecVersion(): String {
return System.getProperty("java.specification.version", "unknown")
}
}
}

View File

@@ -47,4 +47,4 @@ class PlatformRuleTest {
check(false)
}
}
}