summaryrefslogtreecommitdiffstats
path: root/openstack-client/src/main
diff options
context:
space:
mode:
authorIsaac Manuel Raj <isaac.manuelraj@huawei.com>2019-04-17 14:27:50 +0530
committerIsaac Manuel Raj <isaac.manuelraj@huawei.com>2019-04-17 09:01:03 +0000
commit76b5a4c039f8b718d9517b99aacb39fb62bab618 (patch)
treedd904df4167480be2df124344d07ad1c80538e40 /openstack-client/src/main
parent226c37657808fa22336940e9be49147809f41710 (diff)
Replace the type specification in this constructor call with the diamond operator
In Entity.Java replace the type specification in this constructor call with the diamond operator and in OpenStackResponseException.java make "response" transient or serializable. Issue-ID: SO-1490 Change-Id: I9653e42607ca898b5003d4b6050b69e58720ae62 Signed-off-by: Isaac Manuel Raj <isaac.manuelraj@huawei.com>
Diffstat (limited to 'openstack-client/src/main')
-rw-r--r--openstack-client/src/main/java/com/woorea/openstack/base/client/Entity.java14
-rw-r--r--openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackResponseException.java2
2 files changed, 8 insertions, 8 deletions
diff --git a/openstack-client/src/main/java/com/woorea/openstack/base/client/Entity.java b/openstack-client/src/main/java/com/woorea/openstack/base/client/Entity.java
index 25bb014..c68a308 100644
--- a/openstack-client/src/main/java/com/woorea/openstack/base/client/Entity.java
+++ b/openstack-client/src/main/java/com/woorea/openstack/base/client/Entity.java
@@ -19,17 +19,17 @@ package com.woorea.openstack.base.client;
public class Entity<T> {
-
+
private T entity;
-
+
private String contentType;
-
+
public static <T> Entity<T> json(T entity) {
- return new Entity<T>(entity, "application/json");
+ return new Entity<>(entity, "application/json");
}
-
+
public static <T> Entity<T> stream(T entity) {
- return new Entity<T>(entity, "application/octet-stream");
+ return new Entity<>(entity, "application/octet-stream");
}
public Entity(T entity, String contentType) {
@@ -65,5 +65,5 @@ public class Entity<T> {
public void setContentType(String contentType) {
this.contentType = contentType;
}
-
+
}
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 1fcd7a5..e8b1e87 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
@@ -29,7 +29,7 @@ public class OpenStackResponseException extends OpenStackBaseException {
protected final int status;
// Make the response available for exception handling (includes body)
- protected final OpenStackResponse response;
+ protected final transient OpenStackResponse response;
public OpenStackResponseException(String message, int status) {
this.message = message;