Skip to content

Commit

Permalink
Merge pull request #2891 from DimalChandrasiri/release-4.6.2-m4
Browse files Browse the repository at this point in the history
Fix Test Failures
  • Loading branch information
DimalChandrasiri committed Jan 6, 2021
2 parents e7154a4 + e4a9e76 commit 9270e41
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4728,7 +4728,7 @@ public final void addUser(String userName, Object credential, String[] roleList,
throw new UserStoreException(ErrorMessages.ERROR_CODE_READONLY_USER_STORE.toString());
}
// Set skipPasswordPolicyValidation thread local if the user creation flow is ask password enabled.
if (claims.containsKey(UserCoreClaimConstants.ASK_PASSWORD_CLAIM_URI) &&
if (claims != null && claims.containsKey(UserCoreClaimConstants.ASK_PASSWORD_CLAIM_URI) &&
Boolean.parseBoolean(claims.get(UserCoreClaimConstants.ASK_PASSWORD_CLAIM_URI))) {
UserCoreUtil.setSkipPasswordPatternValidationThreadLocal(true);
}
Expand Down Expand Up @@ -13870,7 +13870,7 @@ public final User addUserWithID(String userName, Object credential, String[] rol
throw new UserStoreException(ErrorMessages.ERROR_CODE_READONLY_USER_STORE.toString());
}
// Set skipPasswordPolicyValidation thread local if the user creation flow is ask password enabled.
if (claims.containsKey(UserCoreClaimConstants.ASK_PASSWORD_CLAIM_URI) &&
if (claims != null && claims.containsKey(UserCoreClaimConstants.ASK_PASSWORD_CLAIM_URI) &&
Boolean.parseBoolean(claims.get(UserCoreClaimConstants.ASK_PASSWORD_CLAIM_URI))) {
UserCoreUtil.setSkipPasswordPatternValidationThreadLocal(true);
}
Expand Down

0 comments on commit 9270e41

Please sign in to comment.