summaryrefslogtreecommitdiffstats
path: root/openstack-client-connectors
diff options
context:
space:
mode:
Diffstat (limited to 'openstack-client-connectors')
-rw-r--r--openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java5
-rw-r--r--openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientRedirectStrategy.java2
-rw-r--r--openstack-client-connectors/jersey2-connector/src/main/java/com/woorea/openstack/connector/JaxRs20Response.java2
3 files changed, 5 insertions, 4 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 dc03f9e..f7fa30b 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
@@ -104,6 +104,7 @@ public class HttpClientConnector implements OpenStackClientConnector {
return type.getAnnotation(JsonRootName.class) == null ? DEFAULT_MAPPER : WRAPPED_MAPPER;
}
+ @Override
public <T> OpenStackResponse request(OpenStackRequest<T> request) {
CloseableHttpClient httpClient = null; //HttpClients.createDefault();
@@ -136,8 +137,8 @@ public class HttpClientConnector implements OpenStackClientConnector {
String entityJson = mapper.writeValueAsString (request.entity().getEntity());
entity = new StringEntity(entityJson, ContentType.create(request.entity().getContentType()));
-
- System.out.println("Openstack query JSON:"+entityJson);
+
+ LOGGER.debug("Openstack query JSON:"+entityJson);
LOGGER.debug ("Request JSON Body: " + entityJson.replaceAll("\"password\":\"[^\"]*\"", "\"password\":\"***\""));
} catch (JsonProcessingException e) {
diff --git a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientRedirectStrategy.java b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientRedirectStrategy.java
index 6264589..2ba17fb 100644
--- a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientRedirectStrategy.java
+++ b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientRedirectStrategy.java
@@ -113,7 +113,7 @@ public class HttpClientRedirectStrategy extends DefaultRedirectStrategy {
final int status = response.getStatusLine().getStatusCode();
- HttpUriRequest newRequest = null;
+ HttpUriRequest newRequest;
if (status == HttpStatus.SC_TEMPORARY_REDIRECT || status == HttpStatus.SC_MOVED_TEMPORARILY) {
newRequest = RequestBuilder.copy(request).setUri(uri).build();
} else {
diff --git a/openstack-client-connectors/jersey2-connector/src/main/java/com/woorea/openstack/connector/JaxRs20Response.java b/openstack-client-connectors/jersey2-connector/src/main/java/com/woorea/openstack/connector/JaxRs20Response.java
index a89bdf9..b51c833 100644
--- a/openstack-client-connectors/jersey2-connector/src/main/java/com/woorea/openstack/connector/JaxRs20Response.java
+++ b/openstack-client-connectors/jersey2-connector/src/main/java/com/woorea/openstack/connector/JaxRs20Response.java
@@ -67,7 +67,7 @@ public class JaxRs20Response implements OpenStackResponse {
@Override
public Map<String, String> headers() {
- Map<String, String> headers = new HashMap<String, String>();
+ Map<String, String> headers = new HashMap<>();
for(String k : response.getHeaders().keySet()) {
headers.put(k, response.getHeaderString(k));
}