summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ceilometer-client/src/main/java/com/woorea/openstack/ceilometer/QueriableCeilometerCommand.java6
-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
4 files changed, 9 insertions, 8 deletions
diff --git a/ceilometer-client/src/main/java/com/woorea/openstack/ceilometer/QueriableCeilometerCommand.java b/ceilometer-client/src/main/java/com/woorea/openstack/ceilometer/QueriableCeilometerCommand.java
index 31086dd..7d3bcf3 100644
--- a/ceilometer-client/src/main/java/com/woorea/openstack/ceilometer/QueriableCeilometerCommand.java
+++ b/ceilometer-client/src/main/java/com/woorea/openstack/ceilometer/QueriableCeilometerCommand.java
@@ -24,11 +24,11 @@ import com.woorea.openstack.base.client.OpenStackRequest;
public abstract class QueriableCeilometerCommand<T,R> extends OpenStackRequest<R> {
- protected List<String> fields = new ArrayList<String>();
+ protected List<String> fields = new ArrayList<>();
- protected List<String> ops = new ArrayList<String>();
+ protected List<String> ops = new ArrayList<>();
- protected List<Serializable> values = new ArrayList<Serializable>();
+ protected List<Serializable> values = new ArrayList<>();
private T filter(String field, String op, Serializable value) {
fields.add(field);
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;
}