You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by an...@apache.org on 2014/03/29 00:35:25 UTC

[18/27] git commit: updated refs/heads/master to d4d5cab

CLOUDSTACK-5831: Fix NPE, in case the volume isn't attached to any pool


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

Branch: refs/heads/master
Commit: d4c7574f122c9c00a02bce031184b7f5b5fe1b77
Parents: 7c04aa6
Author: edison <su...@gmail.com>
Authored: Wed Jan 8 17:07:45 2014 -0800
Committer: Anthony Xu <an...@citrix.com>
Committed: Fri Mar 28 16:23:27 2014 -0700

----------------------------------------------------------------------
 server/src/com/cloud/api/query/QueryManagerImpl.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d4c7574f/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java
index 9d5914d..f2c7346 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -1642,6 +1642,10 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
 
         for(VolumeResponse vr : volumeResponses) {
             String poolId = vr.getStoragePoolId();
+            if (poolId == null) {
+                continue;
+            }
+
             DataStore store = dataStoreManager.getPrimaryDataStore(poolId);
             if (store == null) {
                 continue;