From 9b5cb1ef6a6b8968d8b2fe3cd4468496bfe0000f Mon Sep 17 00:00:00 2001 From: Madawa Soysa Date: Mon, 22 Oct 2018 17:47:32 +1100 Subject: [PATCH] Fix issue with search not updating Related: entgra/product-iots#6 --- .../mgt/jaxrs/service/impl/UserManagementServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java index a23f66a148..c31bc3b523 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java @@ -470,7 +470,7 @@ public class UserManagementServiceImpl implements UserManagementService { tempList = getUserList(Constants.USER_CLAIM_LAST_NAME, lastName); if (commonUsers == null || commonUsers.size() == 0) { commonUsers = tempList; - } else if (tempList.size() > 0){ + } else { commonUsers.retainAll(tempList); } } @@ -479,7 +479,7 @@ public class UserManagementServiceImpl implements UserManagementService { tempList = getUserList(Constants.USER_CLAIM_EMAIL_ADDRESS, emailAddress); if (commonUsers == null || commonUsers.size() == 0) { commonUsers = tempList; - } else if (tempList.size() > 0) { + } else { commonUsers.retainAll(tempList); } }