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

This commit is contained in:
Wei Zhou 2016-05-17 14:45:50 +02:00
parent b4ad38d687
commit 59edbb5337
1 changed files with 1 additions and 1 deletions

View File

@ -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);