From caa6430858d99d6060e8a0c73c683a541aee0ed7 Mon Sep 17 00:00:00 2001 From: lashinie Date: Tue, 4 Jun 2024 11:57:31 +0530 Subject: [PATCH] address comments --- .../java/org/wso2/carbon/identity/recovery/util/Utils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/util/Utils.java b/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/util/Utils.java index 7e4aaf7170..77aeeff273 100644 --- a/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/util/Utils.java +++ b/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/util/Utils.java @@ -27,6 +27,7 @@ import org.json.JSONObject; import org.wso2.carbon.CarbonConstants; import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkUtils; import org.wso2.carbon.identity.application.common.model.Property; import org.wso2.carbon.identity.application.common.model.User; import org.wso2.carbon.identity.auth.attribute.handler.exception.AuthAttributeHandlerClientException; @@ -1709,10 +1710,11 @@ public static List getExistingClaimValue(org.wso2.carbon.user.core.UserS List existingClaimValue; try { + String multiAttributeSeparator = FrameworkUtils.getMultiAttributeSeparator(); existingClaimValue = StringUtils.isNotBlank(userStoreManager.getUserClaimValue(user.getUserName(), claimURI, null)) ? new LinkedList<>(Arrays.asList(userStoreManager.getUserClaimValue(user.getUserName(), claimURI, - null).split(","))) : new ArrayList<>(); + null).split(multiAttributeSeparator))) : new ArrayList<>(); } catch (org.wso2.carbon.user.core.UserStoreException e) { throw new IdentityEventException("Error occurred while retrieving claim value of " + claimURI + " for user: " + user.toFullQualifiedUsername(), e);