Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DF751FFB8 for ; Wed, 10 Apr 2013 17:45:52 +0000 (UTC) Received: (qmail 68417 invoked by uid 500); 10 Apr 2013 17:45:43 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 68367 invoked by uid 500); 10 Apr 2013 17:45:43 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 67686 invoked by uid 99); 10 Apr 2013 17:45:42 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Apr 2013 17:45:42 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id AACE1818C54; Wed, 10 Apr 2013 17:45:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bfederle@apache.org To: commits@cloudstack.apache.org Date: Wed, 10 Apr 2013 17:46:06 -0000 Message-Id: <6d9de6fe4c9848b2a8ec5cd023d1c9fd@git.apache.org> In-Reply-To: <1238857236144e60bc193bb611984a1d@git.apache.org> References: <1238857236144e60bc193bb611984a1d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [26/50] [abbrv] git commit: updated refs/heads/ui-mixed-zone-management to 7efbcfa CLOUDSTACK-1675: VMSnapshot: ListVMSnapshotsCmd should not display Domain ID in the Error Message Description: Replace domain db id by uuid in exception message. Signed-off-by: Mice Xia Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d4e2aa32 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d4e2aa32 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d4e2aa32 Branch: refs/heads/ui-mixed-zone-management Commit: d4e2aa32c6555971312fab47c45eef23b57579d1 Parents: d8103af Author: Vijayendra Bhamidipati Authored: Wed Mar 27 09:33:00 2013 -0700 Committer: Mice Xia Committed: Wed Apr 10 11:35:58 2013 +0800 ---------------------------------------------------------------------- server/src/com/cloud/user/AccountManagerImpl.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d4e2aa32/server/src/com/cloud/user/AccountManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/user/AccountManagerImpl.java b/server/src/com/cloud/user/AccountManagerImpl.java index 9736aa1..bc93df8 100755 --- a/server/src/com/cloud/user/AccountManagerImpl.java +++ b/server/src/com/cloud/user/AccountManagerImpl.java @@ -2138,7 +2138,6 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M permittedAccounts, Ternary domainIdRecursiveListProject, boolean listAll, boolean forProjectInvitation) { Long domainId = domainIdRecursiveListProject.first(); - if (domainId != null) { Domain domain = _domainDao.findById(domainId); if (domain == null) { @@ -2154,10 +2153,13 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M } Account userAccount = null; + Domain domain = null; if (domainId != null) { userAccount = _accountDao.findActiveAccount(accountName, domainId); + domain = _domainDao.findById(domainId); } else { userAccount = _accountDao.findActiveAccount(accountName, caller.getDomainId()); + domain = _domainDao.findById(caller.getDomainId()); } if (userAccount != null) { @@ -2165,7 +2167,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M //check permissions permittedAccounts.add(userAccount.getId()); } else { - throw new InvalidParameterValueException("could not find account " + accountName + " in domain " + domainId); + throw new InvalidParameterValueException("could not find account " + accountName + " in domain " + domain.getUuid()); } }