From ecd6b2084ef61bf4933e8568a52ff96ba94fb4ea Mon Sep 17 00:00:00 2001 From: Abhinandan Prateek Date: Mon, 16 Nov 2015 09:52:00 +0530 Subject: [PATCH] CLOUDSTACK-8592: code review fix for empty check on lists --- .../quota/src/org/apache/cloudstack/quota/QuotaServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/database/quota/src/org/apache/cloudstack/quota/QuotaServiceImpl.java b/plugins/database/quota/src/org/apache/cloudstack/quota/QuotaServiceImpl.java index 900798f6c4c..03237db3db4 100644 --- a/plugins/database/quota/src/org/apache/cloudstack/quota/QuotaServiceImpl.java +++ b/plugins/database/quota/src/org/apache/cloudstack/quota/QuotaServiceImpl.java @@ -152,7 +152,7 @@ public class QuotaServiceImpl extends ManagerBase implements QuotaService, Confi if (_domainDao.isChildDomain(caller.getDomainId(), domainId)) { Filter filter = new Filter(AccountVO.class, "id", Boolean.FALSE, null, null); List accounts = _accountDao.listAccounts(accountName, domainId, filter); - if (accounts.size() > 0) { + if (!accounts.isEmpty()) { userAccount = accounts.get(0); } if (userAccount != null) {