Skip to content

Commit

Permalink
add null checks to summaries (#7160)
Browse files Browse the repository at this point in the history
* add missing null check to summaries

* ??

---------

Co-authored-by: amontenegro <[email protected]>
  • Loading branch information
auumgn and amontenegro authored Dec 18, 2024
1 parent 10695b6 commit 6f3e1e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public RecordSummaryPojo getRecordSummaryPojo(String orcid) {
for (EmailDomain ed : recordSummary.getEmailDomains().getEmailDomains()) {
EmailDomainSummary eds = new EmailDomainSummary();
eds.setValue(ed.getValue());
if (ed.getVerificationDate() != null) {
if (ed.getVerificationDate() != null && ed.getVerificationDate().getValue() != null) {
eds.setVerificationDate(ed.getVerificationDate().toString());
}
emailDomains.add(eds);
Expand Down Expand Up @@ -524,7 +524,7 @@ public void generateEmailDomainsSummary(RecordSummary recordSummary, String orci
for (ProfileEmailDomainEntity ped : emailDomains) {
ed = new EmailDomain();
ed.setValue(ped.getEmailDomain());
if (!ped.getGeneratedByScript()) {
if (!ped.getGeneratedByScript() && ped.getDateCreated() != null) {
VerificationDate verificationDate = new VerificationDate(DateUtils.convertToXMLGregorianCalendar(ped.getDateCreated()));
ed.setVerificationDate(verificationDate);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ public void testFindNotificationsToSendLegacy() {
for (Long id : ids) {
notificationDao.remove(id);
}

}

private Long createNotification(String orcid, Date sentDate) {
Expand Down

0 comments on commit 6f3e1e5

Please sign in to comment.