cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [08/12] git commit: updated refs/heads/4.5 to eea716b
Date Mon, 13 Apr 2015 10:15:16 GMT
server: fix NPE case in VolumeApiServiceImpl

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/4.5
Commit: df934c954106a618f8b0aca7e7dfbac890d78244
Parents: d2471df
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Mon Apr 13 15:33:23 2015 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Apr 13 15:44:09 2015 +0530

----------------------------------------------------------------------
 server/src/com/cloud/storage/VolumeApiServiceImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/df934c95/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
index 7fe8893..0f17a57 100644
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@ -1636,12 +1636,12 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
         }
 
         HostVO host = null;
-        StoragePoolVO volumePool = _storagePoolDao.findById(volume.getPoolId());
+        StoragePoolVO volumePool = _storagePoolDao.findByIdIncludingRemoved(volume.getPoolId());
 
         if (hostId != null) {
             host = _hostDao.findById(hostId);
 
-            if (host != null && host.getHypervisorType() == HypervisorType.XenServer
&& volumePool.isManaged()) {
+            if (host != null && host.getHypervisorType() == HypervisorType.XenServer
&& volumePool != null && volumePool.isManaged()) {
                 sendCommand = true;
             }
         }


Mime
View raw message