cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] lujiefsi commented on a change in pull request #2573: Cloudstack 10356
Date Mon, 16 Apr 2018 15:44:23 GMT
lujiefsi commented on a change in pull request #2573: Cloudstack 10356
URL: https://github.com/apache/cloudstack/pull/2573#discussion_r181789077
 
 

 ##########
 File path: plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
 ##########
 @@ -2337,8 +2337,9 @@ public int compare(final DiskTO arg0, final DiskTO arg1) {
                     disk.setCacheMode(DiskDef.DiskCacheMode.valueOf(volumeObjectTO.getCacheMode().toString().toUpperCase()));
                 }
             }
-
-            vm.getDevices().addDevice(disk);
+            if (vm.getDevices() != null) {
 
 Review comment:
   hum. I mean another three "vm.getDevices;" are all in the same function,  vm.getDevices
can always return same object, so add checker at  line 2340 mean that check the parameter
vm is legal.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message