From 76b5a4c039f8b718d9517b99aacb39fb62bab618 Mon Sep 17 00:00:00 2001 From: Isaac Manuel Raj Date: Wed, 17 Apr 2019 14:27:50 +0530 Subject: 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 --- .../main/java/com/woorea/openstack/base/client/Entity.java | 14 +++++++------- .../openstack/base/client/OpenStackResponseException.java | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'openstack-client/src') 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 { - + private T entity; - + private String contentType; - + public static Entity json(T entity) { - return new Entity(entity, "application/json"); + return new Entity<>(entity, "application/json"); } - + public static Entity stream(T entity) { - return new Entity(entity, "application/octet-stream"); + return new Entity<>(entity, "application/octet-stream"); } public Entity(T entity, String contentType) { @@ -65,5 +65,5 @@ public class Entity { 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; -- cgit 1.2.3-korg