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;
|
Long poolId = null;
|
||||||
Map<Long,Long> storage = vmReservation.getVolumeReservation();
|
Map<Long,Long> storage = vmReservation.getVolumeReservation();
|
||||||
if(storage != null){
|
if(storage != null){
|
||||||
List<Long> poolIdList = new ArrayList<Long>(storage.keySet());
|
List<Long> volIdList = new ArrayList<Long>(storage.keySet());
|
||||||
if(poolIdList !=null && !poolIdList.isEmpty()){
|
if(volIdList !=null && !volIdList.isEmpty()){
|
||||||
poolId = poolIdList.get(0);
|
poolId = storage.get(volIdList.get(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user