Skip to content

Commit

Permalink
feature(chore):985 fixed nullpointer
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-mwesener committed Jun 26, 2024
1 parent de6d8a8 commit b638bda
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;

import static org.apache.commons.collections4.ListUtils.emptyIfNull;
Expand Down Expand Up @@ -107,7 +108,7 @@ public void saveAll(List<ContractAgreementEntity> contractAgreements) {
}

private List<Contract> fetchEdcContractAgreements(List<ContractAgreementEntity> contractAgreementEntities) throws ContractAgreementException {
List<String> contractAgreementIds = contractAgreementEntities.stream().map(ContractAgreementEntity::getContractAgreementId).toList();
List<String> contractAgreementIds = contractAgreementEntities.stream().filter(Objects::nonNull).map(ContractAgreementEntity::getContractAgreementId).toList();
log.info("Trying to fetch contractAgreementIds from EDC: " + contractAgreementIds);

List<EdcContractAgreementsResponse> contractAgreements = edcContractAgreementService.getContractAgreements(contractAgreementIds);
Expand Down

0 comments on commit b638bda

Please sign in to comment.