sureshanaparti commented on code in PR #8898:
URL: https://github.com/apache/cloudstack/pull/8898#discussion_r1562454981


##########
engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/store/TemplateObject.java:
##########
@@ -93,10 +95,15 @@ public static TemplateObject getTemplate(VMTemplateVO vo, 
DataStore store, Strin
     }
 
     public void setSize(Long size) {
-        imageVO.setSize(size);
+        getImage().setSize(size);
     }
 
     public VMTemplateVO getImage() {
+        if (imageVO == null) {

Review Comment:
   @DaanHoogland if `imageVO` shouldn't be null for all these get calls, better 
get that initialized during the object creation itself (in constructor), 
instead of throwing errors on get calls.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to