Skip to content

Commit

Permalink
SCRUM-3315: add checks for getEvidenceCodes returning null
Browse files Browse the repository at this point in the history
  • Loading branch information
abecerra committed Jan 8, 2024
1 parent d4c3fad commit ab113d5
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,12 @@ private List<GeneDiseaseAnnotationDocument> createGeneDiseaseAnnotationDocuments
}

Map<String, ECOTerm> evidenceCodesMap = new HashMap<String, ECOTerm>();
gdad.getEvidenceCodes().forEach( ecoTerm -> evidenceCodesMap.put(ecoTerm.getCurie(), ecoTerm));
da.getEvidenceCodes().forEach( ecoTerm -> evidenceCodesMap.put(ecoTerm.getCurie(), ecoTerm));
if(gdad.getEvidenceCodes() != null) {
gdad.getEvidenceCodes().forEach(ecoTerm -> evidenceCodesMap.put(ecoTerm.getCurie(), ecoTerm));
}
if(da.getEvidenceCodes() != null) {
da.getEvidenceCodes().forEach(ecoTerm -> evidenceCodesMap.put(ecoTerm.getCurie(), ecoTerm));
}
gdad.setEvidenceCodes(evidenceCodesMap.values().stream().toList());

if(CollectionUtils.isNotEmpty(da.getDiseaseQualifiers())) {
Expand Down

0 comments on commit ab113d5

Please sign in to comment.