Skip to content

Commit

Permalink
Spotless Apply
Browse files Browse the repository at this point in the history
  • Loading branch information
driverpt committed Jul 5, 2024
1 parent b2c5545 commit 19c0b8f
Showing 1 changed file with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ private static SSLSocketFactory getSslSocketFactoryForCertPath(@Nullable String
return buildSslSocketFactory(trustManager);
}

private static HttpURLConnection setupUrlConnection(String urlStr, String httpMethod, Map<String, String> headers) throws Exception {
private static HttpURLConnection setupUrlConnection(
String urlStr, String httpMethod, Map<String, String> headers) throws Exception {
try {
HttpURLConnection urlConnection = (HttpURLConnection) new URL(urlStr).openConnection();
urlConnection.setRequestMethod(httpMethod);
Expand All @@ -64,10 +65,8 @@ private static HttpURLConnection setupUrlConnection(String urlStr, String httpMe
}

/** Fetch a string from a remote server. */
public String fetchString(String httpMethod,
String urlStr,
Map<String, String> headers,
@Nullable String certPath) {
public String fetchString(
String httpMethod, String urlStr, Map<String, String> headers, @Nullable String certPath) {

try {
HttpURLConnection httpUrlConnection = setupUrlConnection(urlStr, httpMethod, headers);
Expand All @@ -83,12 +82,7 @@ public String fetchString(String httpMethod,
if (responseCode != 200) {
logger.log(
Level.FINE,
"Error response from "
+ urlStr
+ " code ("
+ responseCode
+ ") text "
+ responseBody);
"Error response from " + urlStr + " code (" + responseCode + ") text " + responseBody);
return "";
}
return responseBody;
Expand Down

0 comments on commit 19c0b8f

Please sign in to comment.