summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSindhuri.A <arcot.sindhuri@huawei.com>2019-04-17 18:30:29 +0530
committerSindhuri.A <arcot.sindhuri@huawei.com>2019-04-17 18:30:29 +0530
commit27e5f97fdfd99422303305515c75c436f3749456 (patch)
treeb4a7eaf4cb475096487570a20df3ab16428ad19b
parent9cf72ced6cba4ba7326ceaf34887c212a301b0df (diff)
Change variable name, removed unused import
Change variable name, removed unused import Issue-ID: SO-1490 Change-Id: Ia27b7a4aa631b67dcfb42ed39a74e0187b72772d Signed-off-by: Sindhuri.A <arcot.sindhuri@huawei.com>
-rw-r--r--openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java
index c266f20..d43e6c9 100644
--- a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java
+++ b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java
@@ -29,7 +29,6 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.net.UnknownHostException;
import java.util.List;
-import java.util.Map;
import java.util.Map.Entry;
import org.apache.http.HttpEntity;
@@ -66,7 +65,7 @@ public class HttpClientConnector implements OpenStackClientConnector {
public static final ObjectMapper DEFAULT_MAPPER;
public static final ObjectMapper WRAPPED_MAPPER;
- private static Logger LOGGER = LoggerFactory.getLogger(HttpClientConnector.class);
+ private static Logger logger = LoggerFactory.getLogger(HttpClientConnector.class);
static {
DEFAULT_MAPPER = new ObjectMapper();
@@ -120,7 +119,7 @@ public class HttpClientConnector implements OpenStackClientConnector {
String entityJson = mapper.writeValueAsString (request.entity().getEntity());
entity = new StringEntity(entityJson, ContentType.create(request.entity().getContentType()));
- LOGGER.debug ("Request JSON Body: " + entityJson.replaceAll("\"password\":\"[^\"]*\"", "\"password\":\"***\""));
+ logger.debug ("Request JSON Body: " + entityJson.replaceAll("\"password\":\"[^\"]*\"", "\"password\":\"***\""));
} catch (JsonProcessingException e) {
throw new HttpClientException ("Json processing error on request entity", e);
@@ -142,7 +141,7 @@ public class HttpClientConnector implements OpenStackClientConnector {
httpRequest.addHeader(h.getKey(), sb.toString());
}
- LOGGER.debug ("Sending HTTP request: " + httpRequest.toString());
+ logger.debug ("Sending HTTP request: " + httpRequest.toString());
// Get the Response. But don't get the body entity yet, as this response
// will be wrapped in an HttpClientResponse. The HttpClientResponse
@@ -155,7 +154,7 @@ public class HttpClientConnector implements OpenStackClientConnector {
try {
httpResponse = httpClient.execute(httpRequest);
- LOGGER.debug ("Response status: " + httpResponse.getStatusLine().getStatusCode());
+ logger.debug ("Response status: " + httpResponse.getStatusLine().getStatusCode());
httpClientResponse = new HttpClientResponse (httpResponse);
@@ -180,7 +179,7 @@ public class HttpClientConnector implements OpenStackClientConnector {
}
catch (Exception e) {
// Catchall for anything else, must throw as a RuntimeException
- LOGGER.error ("Unexpected client exception: " +e.getMessage());
+ logger.error ("Unexpected client exception: " +e.getMessage());
throw new RuntimeException("Unexpected client exception", e);
}
finally {
@@ -189,7 +188,7 @@ public class HttpClientConnector implements OpenStackClientConnector {
try {
httpResponse.close();
} catch (IOException e) {
- LOGGER.warn("Unable to close HTTP Response: " + e);
+ logger.warn("Unable to close HTTP Response: " + e);
}
}