Skip to content

Commit

Permalink
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -3535,9 +3535,12 @@ private void doPatchGroup(String groupId, String currentGroupName, Map<String, L
// Update the group name in UM_HYBRID_GROUP_ROLE table.
carbonUM.updateGroupName(currentGroupName, newGroupName);
} catch (UserStoreException e) {
if (e instanceof org.wso2.carbon.user.core.UserStoreException && StringUtils
.equals(UserCoreErrorConstants.ErrorMessages.ERROR_CODE_DUPLICATE_WHILE_WRITING_TO_DATABASE.getCode(),
((org.wso2.carbon.user.core.UserStoreException) e).getErrorCode())) {
if (e instanceof org.wso2.carbon.user.core.UserStoreException && (StringUtils
.equals(UserCoreErrorConstants.ErrorMessages.ERROR_CODE_DUPLICATE_WHILE_WRITING_TO_DATABASE
.getCode(), ((org.wso2.carbon.user.core.UserStoreException) e).getErrorCode()) ||
StringUtils.equals(UserCoreErrorConstants.ErrorMessages
.ERROR_CODE_DUPLICATE_WHILE_UPDATING_USER_OF_ROLE.getCode(),
((org.wso2.carbon.user.core.UserStoreException) e).getErrorCode()))) {
// This handles the scenario where a unique key violation exception occurs when concurrent group
// patch requests try to add the same users to the group.
return;
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -284,7 +284,7 @@
<cxf-bundle.version>3.3.7</cxf-bundle.version>
<inbound.auth.oauth.version>6.5.3</inbound.auth.oauth.version>
<commons-collections.version>3.2.0.wso2v1</commons-collections.version>
<carbon.kernel.version>4.10.12</carbon.kernel.version>
<carbon.kernel.version>4.10.16</carbon.kernel.version>
<identity.framework.version>7.0.112</identity.framework.version>
<junit.version>4.13.1</junit.version>
<commons.lang.version>20030203.000129</commons.lang.version>

0 comments on commit 6dad12a

Please sign in to comment.