From: Isaac Manuel Raj Date: Wed, 17 Apr 2019 08:57:50 +0000 (+0530) Subject: Replace the type specification in this constructor call with the diamond operator X-Git-Tag: 1.4.0~10^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F47%2F85547%2F2;p=so%2Flibs.git 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 --- 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;