Change member variable to transient for serializable class 87/85287/3
authorIsaac Manuel Raj <isaac.manuelraj@huawei.com>
Mon, 15 Apr 2019 07:16:33 +0000 (12:46 +0530)
committerSeshu Kumar M <seshu.kumar.m@huawei.com>
Tue, 16 Apr 2019 12:09:27 +0000 (12:09 +0000)
Made member variable to transient to enhance performance for serializable class.

Issue-ID: SO-1490

Change-Id: Idc34bd665a90c97c2c291030f08e3049ddfff0b6
Signed-off-by: Isaac Manuel Raj <isaac.manuelraj@huawei.com>
glance-model/src/main/java/com/woorea/openstack/glance/model/Image.java
nova-client/src/test/java/com/woorea/openstack/nova/api/extensions/CredentialsExtensionTest.java

index aa7be87..924d274 100644 (file)
@@ -76,7 +76,7 @@ public class Image implements Serializable {
     @JsonProperty("protected")
     private boolean isProtected;
 
-    private Map<String, Object> properties;
+    private transient Map<String, Object> properties;
 
     /**
      * @return the id
@@ -346,10 +346,10 @@ public class Image implements Serializable {
     @Override
     public String toString() {
         return String.format("Image [id=%s, uri=%s, name=%s, diskFormat=%s containerFormat=%s, size=%d, checksum=%s,"
-                + " createdAt=%s, updatedAt=%s, deletedAt=%s, status=%s, isPublic=%s, minRam=%d, minDisk=%d, owner=%s,"
-                + " isDeleted=%s, isProtected=%s, properties=%s]",
-            id, uri, name, diskFormat, containerFormat, size, checksum,
-            createdAt, updatedAt, deletedAt, status, isPublic, minRam, minDisk, owner,
-            isDeleted, isProtected, properties);
+                        + " createdAt=%s, updatedAt=%s, deletedAt=%s, status=%s, isPublic=%s, minRam=%d, minDisk=%d, owner=%s,"
+                        + " isDeleted=%s, isProtected=%s, properties=%s]",
+                id, uri, name, diskFormat, containerFormat, size, checksum,
+                createdAt, updatedAt, deletedAt, status, isPublic, minRam, minDisk, owner,
+                isDeleted, isProtected, properties);
     }
-}
+}
\ No newline at end of file
index 6a6c339..1f80ccd 100644 (file)
@@ -33,6 +33,7 @@ public class CredentialsExtensionTest {
     @Test
     public void showCertificate() throws Exception {
         credentialsExtension.showCertificate();
+        
     }
 
 }
\ No newline at end of file