diff --git a/aws-resources/src/main/java/io/opentelemetry/contrib/aws/resource/SimpleHttpClient.java b/aws-resources/src/main/java/io/opentelemetry/contrib/aws/resource/SimpleHttpClient.java index b38ffa076..4d7e36d84 100644 --- a/aws-resources/src/main/java/io/opentelemetry/contrib/aws/resource/SimpleHttpClient.java +++ b/aws-resources/src/main/java/io/opentelemetry/contrib/aws/resource/SimpleHttpClient.java @@ -47,7 +47,8 @@ private static SSLSocketFactory getSslSocketFactoryForCertPath(@Nullable String return buildSslSocketFactory(trustManager); } - private static HttpURLConnection setupUrlConnection(String urlStr, String httpMethod, Map headers) throws Exception { + private static HttpURLConnection setupUrlConnection( + String urlStr, String httpMethod, Map headers) throws Exception { try { HttpURLConnection urlConnection = (HttpURLConnection) new URL(urlStr).openConnection(); urlConnection.setRequestMethod(httpMethod); @@ -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 headers, - @Nullable String certPath) { + public String fetchString( + String httpMethod, String urlStr, Map headers, @Nullable String certPath) { try { HttpURLConnection httpUrlConnection = setupUrlConnection(urlStr, httpMethod, headers); @@ -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;