incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject git commit: Fix NPE with volume reservation
Date Thu, 24 Jan 2013 00:42:00 GMT
Updated Branches:
  refs/heads/javelin baae73cc0 -> e67381b76


Fix NPE with volume reservation


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/e67381b7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/e67381b7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/e67381b7

Branch: refs/heads/javelin
Commit: e67381b76d1ab1612f86c5d6696518af37cbea1c
Parents: baae73c
Author: Prachi Damle <prachi@cloud.com>
Authored: Wed Jan 23 16:41:05 2013 -0800
Committer: Prachi Damle <prachi@cloud.com>
Committed: Wed Jan 23 16:41:29 2013 -0800

----------------------------------------------------------------------
 .../cloud/entity/api/VMEntityManagerImpl.java      |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e67381b7/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
----------------------------------------------------------------------
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 1c1b3e8..b91a2ca 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<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));
             }
         }
         


Mime
View raw message