You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sw...@apache.org on 2016/05/26 03:05:45 UTC

[06/39] git commit: updated refs/heads/master to 3c800b4

CLOUDSTACK-9380: fix NPE in listDomains API for a mistake


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

Branch: refs/heads/master
Commit: 59edbb53378b700c21a6dd722cd92a7286450644
Parents: b4ad38d
Author: Wei Zhou <w....@tech.leaseweb.com>
Authored: Tue May 17 14:45:50 2016 +0200
Committer: Wei Zhou <w....@tech.leaseweb.com>
Committed: Tue May 17 14:45:50 2016 +0200

----------------------------------------------------------------------
 server/src/com/cloud/api/query/dao/DomainJoinDaoImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/59edbb53/server/src/com/cloud/api/query/dao/DomainJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/DomainJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/DomainJoinDaoImpl.java
index be3f5b4..6aecb81 100644
--- a/server/src/com/cloud/api/query/dao/DomainJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/DomainJoinDaoImpl.java
@@ -110,7 +110,7 @@ public class DomainJoinDaoImpl extends GenericDaoBase<DomainJoinVO, Long> implem
 
         long volumeLimit = ApiDBUtils.findCorrectResourceLimitForDomain(domain.getVolumeLimit(), fullView, ResourceType.volume, domain.getId());
         String volumeLimitDisplay = (fullView || volumeLimit == -1) ? "Unlimited" : String.valueOf(volumeLimit);
-        long volumeTotal = (domain.getVolumeTotal() == 0) ? 0 : domain.getVolumeTotal();
+        long volumeTotal = (domain.getVolumeTotal() == null) ? 0 : domain.getVolumeTotal();
         String volumeAvail = (fullView || volumeLimit == -1) ? "Unlimited" : String.valueOf(volumeLimit - volumeTotal);
         response.setVolumeLimit(volumeLimitDisplay);
         response.setVolumeTotal(volumeTotal);