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


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

Review Comment:
   ```suggestion
       public VMTemplateVO getImage() {
           if (template == null) {
               String msg = String.format("Template Object is not properly 
initialised %s", this.toString());
               s_logger.error(msg);
               throw new InvalidParameterValueException(msg);
           }
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to