summaryrefslogtreecommitdiffstats
path: root/openstack-client-connectors/jersey-connector/src
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2017-10-23 04:16:44 +0000
committerGerrit Code Review <gerrit@onap.org>2017-10-23 04:16:44 +0000
commit646b0091820946ead7ca8e9b351e1647fe259eed (patch)
tree91f22f2d5101cc4c7cf32bec6fbd28085b93ff43 /openstack-client-connectors/jersey-connector/src
parentedb59b53da288feef26a1f6f897251c2160277df (diff)
parent7b86bb9d084bb9642616e80c0980696aa55eade2 (diff)
Merge "Added the "@Override" annotation"
Diffstat (limited to 'openstack-client-connectors/jersey-connector/src')
-rw-r--r--openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyConnector.java2
-rw-r--r--openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyLoggingFilter.java3
-rw-r--r--openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyResponse.java2
3 files changed, 4 insertions, 3 deletions
diff --git a/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyConnector.java b/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyConnector.java
index e621910..eb1b3d5 100644
--- a/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyConnector.java
+++ b/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyConnector.java
@@ -78,7 +78,7 @@ public class JerseyConnector implements OpenStackClientConnector {
headers.add("Content-Type", "application/json");
}
try {
- ClientResponse response = null;
+ ClientResponse response;
if (request.entity() != null && request.entity().getEntity() != null) {
response = target.getHeadHandler().handle(new ClientRequestImpl(target.getURI(), request.method().name(), request.entity().getEntity(), headers));
} else {
diff --git a/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyLoggingFilter.java b/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyLoggingFilter.java
index 7c8cdc6..18f0d84 100644
--- a/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyLoggingFilter.java
+++ b/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyLoggingFilter.java
@@ -100,6 +100,7 @@ public class JerseyLoggingFilter extends ClientFilter {
this.b = b;
}
+ @Override
public OutputStream adapt(ClientRequest request, OutputStream out) throws IOException {
return new LoggingOutputStream(getAdapter().adapt(request, out), b);
}
@@ -292,4 +293,4 @@ public class JerseyLoggingFilter extends ClientFilter {
entityString = entityString.replaceAll(PASSWORD_PATTERN, "\"password\" : \"******\"");
b.append(entityString).append("\n");
}
-} \ No newline at end of file
+}
diff --git a/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyResponse.java b/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyResponse.java
index a2ca2c2..b6ccd04 100644
--- a/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyResponse.java
+++ b/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyResponse.java
@@ -73,7 +73,7 @@ public class JerseyResponse 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.getHeaders().getFirst(k));
}