Skip to content

Commit

Permalink
add null check for recoveryInformationDTO
Browse files Browse the repository at this point in the history
  • Loading branch information
asha15 committed Nov 18, 2023
1 parent 70dec97 commit 8e9e7e8
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,14 @@ private AccountRecoveryType buildPasswordRecoveryInitResponse(String tenantDomai
RecoveryInformationDTO recoveryInformationDTO) {

AccountRecoveryType accountRecoveryType = null;

if (recoveryInformationDTO == null) {
return accountRecoveryType;
}

boolean isNotificationBasedRecoveryEnabled = recoveryInformationDTO.isNotificationBasedRecoveryEnabled();
boolean isQuestionBasedRecoveryAllowedForUser = recoveryInformationDTO.isQuestionBasedRecoveryAllowedForUser();

if (isNotificationBasedRecoveryEnabled) {
// Build next API calls list.
ArrayList<APICall> apiCallsArrayList = new ArrayList<>();
Expand Down

0 comments on commit 8e9e7e8

Please sign in to comment.