bwsw commented on a change in pull request #3058: CLOUDSTACK-3049: update dynamic role for an account URL: https://github.com/apache/cloudstack/pull/3058#discussion_r236702016
########## File path: server/src/main/java/com/cloud/user/AccountManagerImpl.java ########## @@ -1714,23 +1720,37 @@ public AccountVO updateAccount(UpdateAccountCmd cmd) { // Check if user performing the action is allowed to modify this account checkAccess(getCurrentCallingAccount(), _domainMgr.getDomain(account.getDomainId())); - // check if the given account name is unique in this domain for updating - Account duplicateAcccount = _accountDao.findActiveAccount(newAccountName, domainId); - if (duplicateAcccount != null && duplicateAcccount.getId() != account.getId()) { - throw new InvalidParameterValueException( - "There already exists an account with the name:" + newAccountName + " in the domain:" + domainId + " with existing account id:" + duplicateAcccount.getId()); + if(newAccountName != null) { Review comment: @rafaelweingartner Hm, I don't think so or don't get the idea. I would like to distinguish three situations: 1. newAccountName is not specified 2. newAccountName is specified but empty string -> exception 1 3. newAccountName is specified and not empty string -> action or exception So, don't get how `StringUtils.isEmpty()` helps. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services