Replace the type specification in this constructor call with the diamond operator 47/85547/2
authorIsaac Manuel Raj <isaac.manuelraj@huawei.com>
Wed, 17 Apr 2019 08:57:50 +0000 (14:27 +0530)
committerIsaac Manuel Raj <isaac.manuelraj@huawei.com>
Wed, 17 Apr 2019 09:01:03 +0000 (09:01 +0000)
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>
openstack-client/src/main/java/com/woorea/openstack/base/client/Entity.java
openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackResponseException.java

index 25bb014..c68a308 100644 (file)
@@ -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;
     }
-    
+
 }
index 1fcd7a5..e8b1e87 100644 (file)
@@ -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;