File tree Expand file tree Collapse file tree
okhttp-logging-interceptor/src
main/java/okhttp3/logging
test/java/okhttp3/logging Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ static boolean isPlaintext(Buffer buffer) {
326326 }
327327 }
328328
329- private boolean bodyHasUnknownEncoding (Headers headers ) {
329+ private static boolean bodyHasUnknownEncoding (Headers headers ) {
330330 String contentEncoding = headers .get ("Content-Encoding" );
331331 return contentEncoding != null
332332 && !contentEncoding .equalsIgnoreCase ("identity" )
Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ public final class HttpLoggingInterceptorTest {
5959
6060 @ Rule public final MockWebServer server = new MockWebServer ();
6161
62- private HandshakeCertificates handshakeCertificates = localhost ();
63- private HostnameVerifier hostnameVerifier = new RecordingHostnameVerifier ();
62+ private final HandshakeCertificates handshakeCertificates = localhost ();
63+ private final HostnameVerifier hostnameVerifier = new RecordingHostnameVerifier ();
6464 private OkHttpClient client ;
6565 private String host ;
6666 private HttpUrl url ;
@@ -650,7 +650,7 @@ private void bodyGetNoBody(int code) throws IOException {
650650 .assertNoMoreLogs ();
651651 }
652652
653- @ Test public void isPlaintext () throws IOException {
653+ @ Test public void isPlaintext () {
654654 assertTrue (HttpLoggingInterceptor .isPlaintext (new Buffer ()));
655655 assertTrue (HttpLoggingInterceptor .isPlaintext (new Buffer ().writeUtf8 ("abc" )));
656656 assertTrue (HttpLoggingInterceptor .isPlaintext (new Buffer ().writeUtf8 ("new\r \n lines" )));
You can’t perform that action at this time.
0 commit comments