summaryrefslogtreecommitdiffstats
path: root/pnfsimulator
diff options
context:
space:
mode:
authoredyta <edyta.krukowska@nokia.com>2020-04-17 15:44:06 +0200
committeredyta <edyta.krukowska@nokia.com>2020-04-17 16:18:00 +0200
commitcdd2a80678d066440efe580ce10946a60977e3ed (patch)
treef9c846919c84ea8f1e3580b0d45c5be506328379 /pnfsimulator
parent8566d36ed85a784d4f552f4b0e0dffc472deca34 (diff)
Fix sonar issue HttpClientAdapterImpl
Issue-ID: INT-1517 Signed-off-by: Edyta Krukowska <edyta.krukowska@nokia.com> Change-Id: I4b3ccce1525f57102b1a0ed47e1b017f7daebd17
Diffstat (limited to 'pnfsimulator')
-rw-r--r--pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/HttpClientAdapterImpl.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/HttpClientAdapterImpl.java b/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/HttpClientAdapterImpl.java
index 6ea1157..0291878 100644
--- a/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/HttpClientAdapterImpl.java
+++ b/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/HttpClientAdapterImpl.java
@@ -20,15 +20,6 @@
package org.onap.pnfsimulator.simulator.client;
-import static org.onap.pnfsimulator.logging.MDCVariables.REQUEST_ID;
-import static org.onap.pnfsimulator.logging.MDCVariables.X_INVOCATION_ID;
-import static org.onap.pnfsimulator.logging.MDCVariables.X_ONAP_REQUEST_ID;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.security.GeneralSecurityException;
-import java.util.UUID;
-
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.RequestConfig;
@@ -43,6 +34,15 @@ import org.slf4j.MDC;
import org.slf4j.Marker;
import org.slf4j.MarkerFactory;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.security.GeneralSecurityException;
+import java.util.UUID;
+
+import static org.onap.pnfsimulator.logging.MDCVariables.REQUEST_ID;
+import static org.onap.pnfsimulator.logging.MDCVariables.X_INVOCATION_ID;
+import static org.onap.pnfsimulator.logging.MDCVariables.X_ONAP_REQUEST_ID;
+
public class HttpClientAdapterImpl implements HttpClientAdapter {
private static final int CONNECTION_TIMEOUT = 1000;
@@ -55,7 +55,7 @@ public class HttpClientAdapterImpl implements HttpClientAdapter {
.setSocketTimeout(CONNECTION_TIMEOUT)
.build();
private static final Marker INVOKE = MarkerFactory.getMarker("INVOKE");
- private SslSupportLevel sslSupportLevel;
+ private SslSupportLevel sslSupportLevel;
private HttpClient client;
private final String targetUrl;
@@ -82,11 +82,11 @@ public class HttpClientAdapterImpl implements HttpClientAdapter {
EntityUtils.consumeQuietly(response.getEntity());
LOGGER.info(INVOKE, "Message sent, ves response code: {}", response.getStatusLine());
} catch (IOException e) {
- LOGGER.warn("Error sending message to ves: " + e.getMessage(), e.getCause());
+ LOGGER.warn("Error sending message to ves: {}", e.getMessage(), e.getCause());
}
}
- public SslSupportLevel getSslSupportLevel(){
+ public SslSupportLevel getSslSupportLevel() {
return sslSupportLevel;
}