dhlaluku commented on a change in pull request #2848: Vmware offline migration
URL: https://github.com/apache/cloudstack/pull/2848#discussion_r242520154
 
 

 ##########
 File path: 
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
 ##########
 @@ -4720,8 +4721,11 @@ protected VirtualMachine retrieve() {
         final User user = context.getCallingUser();
         final Account account = context.getCallingAccount();
 
-        for (StoragePool destPool : dest.getStorageForDisks().values()) {
-            checkConcurrentJobsPerDatastoreThreshhold(destPool);
+        Collection<StoragePool> storagePools = 
dest.getStorageForDisks().values();
 
 Review comment:
   That's true, the nullity check has to be for the Map returned by 
'dest.getStorageForDisks()'.
   Refactored to use this approach;
   
           Map<Volume, StoragePool> volumeStorageMap = 
dest.getStorageForDisks();
           if (volumeStorageMap != null) {
               for (Volume vol : volumeStorageMap.keySet()) {
                   
checkConcurrentJobsPerDatastoreThreshhold(volumeStorageMap.get(vol));
               }
           }
   
   
   
   

----------------------------------------------------------------
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