summaryrefslogtreecommitdiffstats
path: root/openstack-client/src/main
diff options
context:
space:
mode:
authorrama-huawei <rama.subba.reddy.s@huawei.com>2017-10-17 15:59:37 +0530
committerrama-huawei <rama.subba.reddy.s@huawei.com>2017-10-17 16:01:39 +0530
commitf47593695b68356803d45475b85a0e12388426cc (patch)
treea605a8985ee725721c7638427c19b5e41ad06401 /openstack-client/src/main
parent4ee9b223bc85bfaae4e1911b439d94d4cf424cdf (diff)
Replace type in constructor with diamond operator
Issue-id:SO-227 Change-Id: Iffd874a5abad36d282f62e4e7cce9a3cd36e3c80 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
Diffstat (limited to 'openstack-client/src/main')
-rw-r--r--openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackClient.java2
-rw-r--r--openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackRequest.java8
-rw-r--r--openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackResponseException.java1
3 files changed, 6 insertions, 5 deletions
diff --git a/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackClient.java b/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackClient.java
index d1889b9..7d5f14f 100644
--- a/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackClient.java
+++ b/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackClient.java
@@ -100,7 +100,7 @@ public class OpenStackClient {
}
public <R> OpenStackRequest<R> get(String path, Class<R> returnType) {
- return new OpenStackRequest<R>(this, HttpMethod.GET, path, null, returnType);
+ return new OpenStackRequest<>(this, HttpMethod.GET, path, null, returnType);
}
}
diff --git a/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackRequest.java b/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackRequest.java
index 7708304..fabd9db 100644
--- a/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackRequest.java
+++ b/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackRequest.java
@@ -46,7 +46,7 @@ public class OpenStackRequest<R> {
private StringBuilder path = new StringBuilder();
- private Map<String, List<Object>> headers = new HashMap<String, List<Object>>();
+ private Map<String, List<Object>> headers = new HashMap<>();
private Entity<?> entity;
@@ -91,7 +91,7 @@ public class OpenStackRequest<R> {
}
public <T> Entity<T> entity(T entity, String contentType) {
- return new Entity<T>(entity, contentType);
+ return new Entity<>(entity, contentType);
}
public Entity<?> entity() {
@@ -128,7 +128,7 @@ public class OpenStackRequest<R> {
+ entity + ", returnType=" + returnType + "]";
}
- private Map<String, List<Object> > queryParams = new LinkedHashMap<String, List<Object> >();
+ private Map<String, List<Object> > queryParams = new LinkedHashMap<>();
public Map<String, List<Object> > queryParams() {
return queryParams;
@@ -139,7 +139,7 @@ public class OpenStackRequest<R> {
List<Object> values = queryParams.get(key);
values.add(value);
} else {
- List<Object> values = new ArrayList<Object>();
+ List<Object> values = new ArrayList<>();
values.add(value);
queryParams.put(key, values);
}
diff --git a/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackResponseException.java b/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackResponseException.java
index 8959b41..edc7ec0 100644
--- a/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackResponseException.java
+++ b/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackResponseException.java
@@ -43,6 +43,7 @@ public class OpenStackResponseException extends OpenStackBaseException {
this.response = response;
}
+ @Override
public String getMessage() {
return message;
}