1414package feign ;
1515
1616import static java .lang .String .format ;
17-
1817import java .io .IOException ;
1918import java .io .InputStream ;
2019import java .io .OutputStream ;
2625import java .util .Map ;
2726import java .util .zip .DeflaterOutputStream ;
2827import java .util .zip .GZIPOutputStream ;
29-
3028import javax .net .ssl .HostnameVerifier ;
3129import javax .net .ssl .HttpsURLConnection ;
3230import javax .net .ssl .SSLSocketFactory ;
33-
3431import feign .Request .Options ;
35-
3632import static feign .Util .CONTENT_ENCODING ;
3733import static feign .Util .CONTENT_LENGTH ;
3834import static feign .Util .ENCODING_DEFLATE ;
@@ -73,8 +69,7 @@ public Response execute(Request request, Options options) throws IOException {
7369 }
7470
7571 HttpURLConnection convertAndSend (Request request , Options options ) throws IOException {
76- final HttpURLConnection
77- connection =
72+ final HttpURLConnection connection =
7873 (HttpURLConnection ) new URL (request .url ()).openConnection ();
7974 if (connection instanceof HttpsURLConnection ) {
8075 HttpsURLConnection sslCon = (HttpsURLConnection ) connection ;
@@ -92,11 +87,9 @@ HttpURLConnection convertAndSend(Request request, Options options) throws IOExce
9287 connection .setRequestMethod (request .method ());
9388
9489 Collection <String > contentEncodingValues = request .headers ().get (CONTENT_ENCODING );
95- boolean
96- gzipEncodedRequest =
90+ boolean gzipEncodedRequest =
9791 contentEncodingValues != null && contentEncodingValues .contains (ENCODING_GZIP );
98- boolean
99- deflateEncodedRequest =
92+ boolean deflateEncodedRequest =
10093 contentEncodingValues != null && contentEncodingValues .contains (ENCODING_DEFLATE );
10194
10295 boolean hasAcceptHeader = false ;
@@ -174,11 +167,11 @@ Response convertResponse(HttpURLConnection connection) throws IOException {
174167 stream = connection .getInputStream ();
175168 }
176169 return Response .builder ()
177- .status (status )
178- .reason (reason )
179- .headers (headers )
180- .body (stream , length )
181- .build ();
170+ .status (status )
171+ .reason (reason )
172+ .headers (headers )
173+ .body (stream , length )
174+ .build ();
182175 }
183176 }
184177}
0 commit comments