@@ -47,7 +47,8 @@ private static SSLSocketFactory getSslSocketFactoryForCertPath(@Nullable String
47
47
return buildSslSocketFactory (trustManager );
48
48
}
49
49
50
- private static HttpURLConnection setupUrlConnection (String urlStr , String httpMethod , Map <String , String > headers ) throws Exception {
50
+ private static HttpURLConnection setupUrlConnection (
51
+ String urlStr , String httpMethod , Map <String , String > headers ) throws Exception {
51
52
try {
52
53
HttpURLConnection urlConnection = (HttpURLConnection ) new URL (urlStr ).openConnection ();
53
54
urlConnection .setRequestMethod (httpMethod );
@@ -64,10 +65,8 @@ private static HttpURLConnection setupUrlConnection(String urlStr, String httpMe
64
65
}
65
66
66
67
/** Fetch a string from a remote server. */
67
- public String fetchString (String httpMethod ,
68
- String urlStr ,
69
- Map <String , String > headers ,
70
- @ Nullable String certPath ) {
68
+ public String fetchString (
69
+ String httpMethod , String urlStr , Map <String , String > headers , @ Nullable String certPath ) {
71
70
72
71
try {
73
72
HttpURLConnection httpUrlConnection = setupUrlConnection (urlStr , httpMethod , headers );
@@ -83,12 +82,7 @@ public String fetchString(String httpMethod,
83
82
if (responseCode != 200 ) {
84
83
logger .log (
85
84
Level .FINE ,
86
- "Error response from "
87
- + urlStr
88
- + " code ("
89
- + responseCode
90
- + ") text "
91
- + responseBody );
85
+ "Error response from " + urlStr + " code (" + responseCode + ") text " + responseBody );
92
86
return "" ;
93
87
}
94
88
return responseBody ;
0 commit comments