Source:
<code>protected boolean canDoAction() { addCanDoActionMessage(VdcBllMessages.VAR__ACTION__UPDATE); boolean returnValue = super.canDoAction() && CheckStorageDomain() && checkStorageDomainStatus(StorageDomainStatus.Active) && CheckStorageDomainNameLengthValid(); storage_domain_static oldDomain = DbFacade.getInstance().getStorageDomainStaticDAO().get(getStorageDomain().getId()); if (returnValue) { getStorageDomain().setLastTimeUsedAsMaster(oldDomain.getLastTimeUsedAsMaster()); } List<String> props = ObjectIdentityChecker.GetChangedFields(oldDomain, getStorageDomain() .getStorageStaticData()); props.remove("storage_name"); if (returnValue && props.size() > 0) { <START> log.errorFormat("There was an attempt to update the following fields although they are not allowed to be updated: {0}", <END> StringUtils.join(props, ",")); addCanDoActionMessage(VdcBllMessages.ERROR_CANNOT_CHANGE_STORAGE_DOMAIN_FIELDS); returnValue = false; } _storageDomainNameChanged = !StringHelper.EqOp(oldDomain.getstorage_name(), getStorageDomain() .getstorage_name()); if (returnValue && _storageDomainNameChanged && getStoragePool() != null && !((Boolean) Backend .getInstance() .getResourceManager() .RunVdsCommand(VDSCommandType.IsValid, new IrsBaseVDSCommandParameters(getStoragePool().getId())).getReturnValue()) .booleanValue()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_REPOSITORY_NOT_FOUND); returnValue = false; } if (returnValue && _storageDomainNameChanged && IsStorageWithSameNameExists()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST); returnValue = false; } return returnValue; }</code><technical_language>i warn</technical_language>

Target:
protected boolean canDoAction() { addCanDoActionMessage(VdcBllMessages.VAR__ACTION__UPDATE); boolean returnValue = super.canDoAction() && CheckStorageDomain() && checkStorageDomainStatus(StorageDomainStatus.Active) && CheckStorageDomainNameLengthValid(); storage_domain_static oldDomain = DbFacade.getInstance().getStorageDomainStaticDAO().get(getStorageDomain().getId()); if (returnValue) { getStorageDomain().setLastTimeUsedAsMaster(oldDomain.getLastTimeUsedAsMaster()); } List<String> props = ObjectIdentityChecker.GetChangedFields(oldDomain, getStorageDomain() .getStorageStaticData()); props.remove("storage_name"); if (returnValue && props.size() > 0) { log.warnFormat("There was an attempt to update the following fields although they are not allowed to be updated: {0}", StringUtils.join(props, ",")); addCanDoActionMessage(VdcBllMessages.ERROR_CANNOT_CHANGE_STORAGE_DOMAIN_FIELDS); returnValue = false; } _storageDomainNameChanged = !StringHelper.EqOp(oldDomain.getstorage_name(), getStorageDomain() .getstorage_name()); if (returnValue && _storageDomainNameChanged && getStoragePool() != null && !((Boolean) Backend .getInstance() .getResourceManager() .RunVdsCommand(VDSCommandType.IsValid, new IrsBaseVDSCommandParameters(getStoragePool().getId())).getReturnValue()) .booleanValue()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_REPOSITORY_NOT_FOUND); returnValue = false; } if (returnValue && _storageDomainNameChanged && IsStorageWithSameNameExists()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST); returnValue = false; } return returnValue; }