mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix NPE with volume reservation
This commit is contained in:
parent
baae73cc05
commit
e67381b76d
@ -196,9 +196,9 @@ public class VMEntityManagerImpl implements VMEntityManager {
|
||||
Long poolId = null;
|
||||
Map<Long,Long> storage = vmReservation.getVolumeReservation();
|
||||
if(storage != null){
|
||||
List<Long> poolIdList = new ArrayList<Long>(storage.keySet());
|
||||
if(poolIdList !=null && !poolIdList.isEmpty()){
|
||||
poolId = poolIdList.get(0);
|
||||
List<Long> volIdList = new ArrayList<Long>(storage.keySet());
|
||||
if(volIdList !=null && !volIdList.isEmpty()){
|
||||
poolId = storage.get(volIdList.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user