diff options
Diffstat (limited to 'openstack-client')
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; } |