bug 10092: fix the Long compare

status 10092: resolved fixed
This commit is contained in:
Edison Su 2011-06-21 14:32:48 -04:00
parent f8abe298d4
commit 54a4af2a0c

View File

@ -959,7 +959,7 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
if (isResourceDomainAdmin(caller.getType())) {
if (zoneId == null)
return getZoneIdForAccount(caller);
else if (getZoneIdForAccount(caller) != zoneId)
else if (zoneId.compareTo(getZoneIdForAccount(caller)) != 0)
throw new PermissionDeniedException("Caller " + caller + "is not allowed to access the zone " + zoneId);
else
return zoneId;