Pull request #388: RED-4009: Fixed NPE if comments are null in RedactionLogMergeService

Merge in RED/redaction-service from RED-4009 to master

* commit 'd2807e0ff1ef288c7456383974a8607a8fca4821':
  RED-4009: Fixed NPE if comments are null in RedactionLogMergeService
This commit is contained in:
Dominique Eiflaender 2022-05-10 13:24:23 +02:00
commit 0601ec4862

View File

@ -349,7 +349,7 @@ public class RedactionLogMergeService {
}
private List<RedactionLogComment> convert(List<Comment> comments) {
return comments.stream().map(c -> new RedactionLogComment(c.getId(), c.getUser(), c.getText(), c.getAnnotationId(),
return comments == null ? null :comments.stream().map(c -> new RedactionLogComment(c.getId(), c.getUser(), c.getText(), c.getAnnotationId(),
c.getFileId(), c.getDate(), c.getSoftDeletedTime())).collect(Collectors.toList());
}