diff options
author | rama-huawei <rama.subba.reddy.s@huawei.com> | 2017-10-18 11:29:23 +0530 |
---|---|---|
committer | rama-huawei <rama.subba.reddy.s@huawei.com> | 2017-10-18 11:29:54 +0530 |
commit | 7b86bb9d084bb9642616e80c0980696aa55eade2 (patch) | |
tree | ff6eead89aaf3df3f9790601c73bd5783a45960f /openstack-client-connectors/jersey-connector/src/main/java | |
parent | f47593695b68356803d45475b85a0e12388426cc (diff) |
Added the "@Override" annotation
Issue-id: SO-224
Change-Id: Ia7802db1ba32a97340bca8d0c71714b988abb6e5
Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
Diffstat (limited to 'openstack-client-connectors/jersey-connector/src/main/java')
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));
}
|