rafaelweingartner commented on a change in pull request #2146: CLOUDSTACK-4757: 
Support OVA files with multiple disks for templates
URL: https://github.com/apache/cloudstack/pull/2146#discussion_r158598357
 
 

 ##########
 File path: api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
 ##########
 @@ -443,6 +449,37 @@ public String getKeyboard() {
         return dhcpOptionsMap;
     }
 
+    public Map<Long, DiskOffering> getDataDiskTemplateToDiskOfferingMap() {
+        if (diskOfferingId != null && dataDiskTemplateToDiskOfferingList != 
null) {
 
 Review comment:
   Great. Then, what about changing things a little bit to reduce the number of 
lines inside an IF statement?
   
   You could do `if(CollectionUtils.isEmpty(dataDiskTemplateToDiskOfferingList 
)){return new HashMap<Long, DiskOffering>()}`
   
   Then, you would not need the `if` statement at line 457. This reduces one 
level of cyclomatic complexity in this method.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to