1
0
mirror of https://github.com/square/okhttp.git synced 2025-11-30 18:01:29 +03:00

Sort imports and wrap documentation at 100 columns.

This is a mechanical refactoring. The only thing I had trouble with is IntelliJ's
weak support for <ul> tags in Javadoc.
This commit is contained in:
jwilson
2015-12-23 19:16:22 -05:00
parent 86694b984f
commit 98ae0fb92c
182 changed files with 2055 additions and 2140 deletions

View File

@@ -15,14 +15,6 @@
*/
package okhttp3.internal.huc;
import okhttp3.AbstractResponseCache;
import okhttp3.OkHttpClient;
import okhttp3.OkUrlFactory;
import okhttp3.internal.Internal;
import okhttp3.internal.SslContextBuilder;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.testing.RecordingHostnameVerifier;
import java.io.IOException;
import java.net.CacheRequest;
import java.net.CacheResponse;
@@ -38,6 +30,14 @@ import java.util.Map;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import okhttp3.AbstractResponseCache;
import okhttp3.OkHttpClient;
import okhttp3.OkUrlFactory;
import okhttp3.internal.Internal;
import okhttp3.internal.SslContextBuilder;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.testing.RecordingHostnameVerifier;
import okio.Buffer;
import org.junit.After;
import org.junit.Before;
@@ -51,10 +51,10 @@ import static org.junit.Assert.assertTrue;
/**
* A white-box test for {@link CacheAdapter}. See also:
* <ul>
* <li>{@link ResponseCacheTest} for black-box tests that check that {@link ResponseCache}
* classes are called correctly by OkHttp.</li>
* <li>{@link JavaApiConverterTest} for tests that check Java API classes / OkHttp conversion
* logic. </li>
* <li>{@link ResponseCacheTest} for black-box tests that check that {@link ResponseCache}
* classes are called correctly by OkHttp.
* <li>{@link JavaApiConverterTest} for tests that check Java API classes / OkHttp conversion
* logic.
* </ul>
*/
public class CacheAdapterTest {
@@ -81,8 +81,8 @@ public class CacheAdapterTest {
assertEquals("http", serverUrl.getProtocol());
ResponseCache responseCache = new AbstractResponseCache() {
@Override
public CacheResponse get(URI uri, String method, Map<String, List<String>> headers) throws IOException {
@Override public CacheResponse get(
URI uri, String method, Map<String, List<String>> headers) throws IOException {
assertEquals(toUri(serverUrl), uri);
assertEquals("GET", method);
assertTrue("Arbitrary standard header not present", headers.containsKey("User-Agent"));
@@ -214,7 +214,8 @@ public class CacheAdapterTest {
assertEquals(serverUrl, connection.getURL());
HttpsURLConnection cacheHttpsUrlConnection = (HttpsURLConnection) connection;
HttpsURLConnection realHttpsUrlConnection = (HttpsURLConnection) CacheAdapterTest.this.connection;
HttpsURLConnection realHttpsUrlConnection =
(HttpsURLConnection) CacheAdapterTest.this.connection;
assertEquals(realHttpsUrlConnection.getCipherSuite(),
cacheHttpsUrlConnection.getCipherSuite());
assertEquals(realHttpsUrlConnection.getPeerPrincipal(),