Repository: cloudstack
Updated Branches:
  refs/heads/master 90287cc60 -> 7a555b398


CLOUDSTACK-7523
java.lang.NullPointerException when listing accounts


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

Branch: refs/heads/master
Commit: 7a555b398fffafcca0a88aed56c6f8d57d8b3ae1
Parents: e06fa18
Author: Frank Zhang <frank.zh...@citrix.com>
Authored: Wed Sep 10 14:43:26 2014 -0700
Committer: Frank Zhang <frank.zh...@citrix.com>
Committed: Wed Sep 10 14:43:41 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a555b39/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java 
b/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
old mode 100644
new mode 100755
index ecd97c7..31d5a2c
--- a/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
@@ -141,7 +141,7 @@ public class AccountJoinDaoImpl extends 
GenericDaoBase<AccountJoinVO, Long> impl
 
         long volumeLimit = 
ApiDBUtils.findCorrectResourceLimit(account.getVolumeLimit(), account.getId(), 
ResourceType.volume);
         String volumeLimitDisplay = (fullView || volumeLimit == -1) ? 
"Unlimited" : String.valueOf(volumeLimit);
-        long volumeTotal = (account.getVolumeTotal() == 0) ? 0 : 
account.getVolumeTotal();
+        long volumeTotal = (account.getVolumeTotal() == null) ? 0 : 
account.getVolumeTotal();
         String volumeAvail = (fullView || volumeLimit == -1) ? "Unlimited" : 
String.valueOf(volumeLimit - volumeTotal);
         response.setVolumeLimit(volumeLimitDisplay);
         response.setVolumeTotal(volumeTotal);

Reply via email to