Skip to content

Commit

Permalink
Merge pull request #32 from ravishanigarapu/develop
Browse files Browse the repository at this point in the history
Null condition check
  • Loading branch information
devikasuresh20 authored Nov 19, 2024
2 parents 1fbc191 + 66b4f4f commit ee64e8c
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,13 @@ public String updateBeneficiaryIDInCall(
Integer startedCall = null;
try {
BeneficiaryCall beneficiarycall = inputMapper.gson().fromJson(beneficiaryCall, BeneficiaryCall.class);

startedCall = beneficiaryCallService.updateBeneficiaryIDInCall(beneficiarycall.getBenCallID(),
beneficiarycall.getBeneficiaryRegID());
output.setResponse(startedCall.toString());

if (null != beneficiarycall.getBeneficiaryRegID()) {
startedCall = beneficiaryCallService.updateBeneficiaryIDInCall(beneficiarycall.getBenCallID(),
beneficiarycall.getBeneficiaryRegID());
output.setResponse(startedCall.toString());
}else {
output.setResponse("Update skipped : BeneficiaryRegID is null");
}
logger.info("updateBeneficiaryIDInCall was called successfully");
} catch (Exception e) {
logger.error("updateBeneficiaryIDInCall failed with error " + e.getMessage(), e);
Expand Down

0 comments on commit ee64e8c

Please sign in to comment.