cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [31/53] [abbrv] git commit: updated refs/heads/reporter to 5c99784
Date Wed, 15 Apr 2015 08:05:31 GMT
server: fix NPE case in VolumeApiServiceImpl

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit df934c954106a618f8b0aca7e7dfbac890d78244)
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/a07497b3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a07497b3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a07497b3

Branch: refs/heads/reporter
Commit: a07497b3731372bf902aae9569e6d579abaec3f8
Parents: 48ef7e5
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:47:51 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/a07497b3/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 cae1e1d..dbae194 100644
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@ -1650,12 +1650,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