Skip to content

Commit

Permalink
fixed NPE (#848)
Browse files Browse the repository at this point in the history
Co-authored-by: Faheem Ahmad <[email protected]>
  • Loading branch information
faheem205 and Faheem Ahmad authored Jun 27, 2024
1 parent 52ae5b4 commit 2415841
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public Page<LoanAccountData> retrieveAll(final SearchParameters searchParameters

final Collection<AgencyData> agencyOptions = this.agencyReadPlatformService.retrieveAllByUser();
final Set<Long> agencyIds = agencyOptions.stream().map(AgencyData::getId).collect(Collectors.toSet());
if (!agencyIds.isEmpty() && searchParameters.getAgencyId() == null) {
if (searchParameters != null && !agencyIds.isEmpty() && searchParameters.getAgencyId() == null) {
final String agencyIdParams = StringUtils.join(agencyIds, ", ");
sqlBuilder.append(" AND (agency.id IN ( ").append(agencyIdParams).append(") OR agency.id is null )");
}
Expand Down

0 comments on commit 2415841

Please sign in to comment.