ravening commented on a change in pull request #4186:
URL: https://github.com/apache/cloudstack/pull/4186#discussion_r447243624
##########
File path: engine/schema/src/main/java/com/cloud/user/dao/AccountDaoImpl.java
##########
@@ -157,9 +157,16 @@ public AccountDaoImpl() {
@Override
public List<AccountVO> findAccountsLike(String accountName) {
+ return findAccountsLike(accountName, null);
+ }
+
+ @Override
+ public List<AccountVO> findAccountsLike(String accountName, Filter filter)
{
SearchCriteria<AccountVO> sc = createSearchCriteria();
- sc.addAnd("accountName", SearchCriteria.Op.LIKE, "%" + accountName +
"%");
- return listBy(sc);
+ if (accountName != null) {
Review comment:
Why not use `Optional` instead of null?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]