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); } }