From e67381b76d1ab1612f86c5d6696518af37cbea1c Mon Sep 17 00:00:00 2001 From: Prachi Damle Date: Wed, 23 Jan 2013 16:41:05 -0800 Subject: [PATCH] Fix NPE with volume reservation --- .../engine/cloud/entity/api/VMEntityManagerImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java index 1c1b3e8940c..b91a2cabd62 100644 --- a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java @@ -196,9 +196,9 @@ public class VMEntityManagerImpl implements VMEntityManager { Long poolId = null; Map storage = vmReservation.getVolumeReservation(); if(storage != null){ - List poolIdList = new ArrayList(storage.keySet()); - if(poolIdList !=null && !poolIdList.isEmpty()){ - poolId = poolIdList.get(0); + List volIdList = new ArrayList(storage.keySet()); + if(volIdList !=null && !volIdList.isEmpty()){ + poolId = storage.get(volIdList.get(0)); } }