Skip to content

Commit

Permalink
Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
PasinduYeshan committed Jan 16, 2025
1 parent 161e3cf commit fde0923
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -729,11 +729,11 @@ private void syncAttributeProfileProperties(Map<String, String> claimProperties,
}
}

// If we never found a profile value that matches the global value, and all profiles share a common non-blank
// value, then overwrite the global property with the common value and remove the profile-specific properties.
if (!isAtLeastOneProfileValueMatchingGlobal && isAllProfilesHaveSameValue) {
if (isAllProfilesHaveSameValue && !isAtLeastOneProfileValueMatchingGlobal) {
// All the profiles have same value and the global value is different value. Hence, update the global value.
claimProperties.put(propertyKey, commonProfileValue);

// Remove the profile-specific properties as the global value denotes all the profile properties.
allowedClaimProfiles.forEach(profile -> {
String key = ClaimConstants.PROFILES_CLAIM_PROPERTY_PREFIX + profile +
ClaimConstants.CLAIM_PROFILE_PROPERTY_DELIMITER + propertyKey;
Expand Down

0 comments on commit fde0923

Please sign in to comment.