mirror of
https://github.com/square/okhttp.git
synced 2026-01-14 07:22:20 +03:00
Merge pull request #5109 from square/jakew/rename/2019-05-23
Rename internal file and specify non-Kt-suffixed name
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/** Exposes Kotlin-internal APIs to Java test code and code in other modules. */
|
||||
@file:JvmName("Internal")
|
||||
|
||||
package okhttp3.internal
|
||||
|
||||
import okhttp3.Cache
|
||||
@@ -34,7 +34,7 @@ import java.util.TimeZone;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import okhttp3.internal.InternalKtKt;
|
||||
import okhttp3.internal.Internal;
|
||||
import okhttp3.internal.io.InMemoryFileSystem;
|
||||
import okhttp3.internal.platform.Platform;
|
||||
import okhttp3.mockwebserver.MockResponse;
|
||||
@@ -51,7 +51,7 @@ import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import static okhttp3.internal.InternalKtKt.cacheGet;
|
||||
import static okhttp3.internal.Internal.cacheGet;
|
||||
import static okhttp3.mockwebserver.SocketPolicy.DISCONNECT_AT_END;
|
||||
import static okhttp3.tls.internal.TlsUtil.localhost;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
@@ -1992,7 +1992,7 @@ public final class CacheTest {
|
||||
@Test public void emptyResponseHeaderNameFromCacheIsLenient() throws Exception {
|
||||
Headers.Builder headers = new Headers.Builder()
|
||||
.add("Cache-Control: max-age=120");
|
||||
InternalKtKt.addHeaderLenient(headers, ": A");
|
||||
Internal.addHeaderLenient(headers, ": A");
|
||||
server.enqueue(new MockResponse()
|
||||
.setHeaders(headers.build())
|
||||
.setBody("body"));
|
||||
|
||||
@@ -91,7 +91,7 @@ import static java.net.CookiePolicy.ACCEPT_ORIGINAL_SERVER;
|
||||
import static java.util.Arrays.asList;
|
||||
import static okhttp3.CipherSuite.TLS_DH_anon_WITH_AES_128_GCM_SHA256;
|
||||
import static okhttp3.TestUtil.awaitGarbageCollection;
|
||||
import static okhttp3.internal.InternalKtKt.addHeaderLenient;
|
||||
import static okhttp3.internal.Internal.addHeaderLenient;
|
||||
import static okhttp3.internal.platform.PlatformTest.getJvmSpecVersion;
|
||||
import static okhttp3.tls.internal.TlsUtil.localhost;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -21,7 +21,7 @@ import static okhttp3.CipherSuite.TLS_KRB5_WITH_DES_CBC_MD5;
|
||||
import static okhttp3.CipherSuite.TLS_RSA_EXPORT_WITH_RC4_40_MD5;
|
||||
import static okhttp3.CipherSuite.TLS_RSA_WITH_AES_128_CBC_SHA256;
|
||||
import static okhttp3.CipherSuite.forJavaName;
|
||||
import static okhttp3.internal.InternalKtKt.applyConnectionSpec;
|
||||
import static okhttp3.internal.Internal.applyConnectionSpec;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
import static okhttp3.internal.InternalKtKt.applyConnectionSpec;
|
||||
import static okhttp3.internal.Internal.applyConnectionSpec;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import okhttp3.internal.http.HttpDate;
|
||||
import org.junit.Test;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
import static okhttp3.internal.InternalKtKt.parseCookie;
|
||||
import static okhttp3.internal.Internal.parseCookie;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ import javax.net.ssl.SSLSocketFactory;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.TrustManagerFactory;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
import okhttp3.internal.InternalKtKt;
|
||||
import okhttp3.internal.Internal;
|
||||
import okhttp3.internal.RecordingAuthenticator;
|
||||
import okhttp3.internal.RecordingOkAuthenticator;
|
||||
import okhttp3.internal.Version;
|
||||
@@ -88,7 +88,7 @@ import static java.util.Arrays.asList;
|
||||
import static java.util.Locale.US;
|
||||
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||
import static java.util.concurrent.TimeUnit.NANOSECONDS;
|
||||
import static okhttp3.internal.InternalKtKt.addHeaderLenient;
|
||||
import static okhttp3.internal.Internal.addHeaderLenient;
|
||||
import static okhttp3.internal.Util.immutableListOf;
|
||||
import static okhttp3.internal.http.StatusLine.HTTP_PERM_REDIRECT;
|
||||
import static okhttp3.internal.http.StatusLine.HTTP_TEMP_REDIRECT;
|
||||
@@ -3115,7 +3115,7 @@ public final class URLConnectionTest {
|
||||
|
||||
@Test public void emptyResponseHeaderNameIsLenient() throws Exception {
|
||||
Headers.Builder headers = new Headers.Builder();
|
||||
InternalKtKt.addHeaderLenient(headers, ":A");
|
||||
Internal.addHeaderLenient(headers, ":A");
|
||||
server.enqueue(new MockResponse()
|
||||
.setHeaders(headers.build())
|
||||
.setBody("body"));
|
||||
|
||||
Reference in New Issue
Block a user