RED-4009: Fixed NPE if comments are null in RedactionLogMergeService

This commit is contained in:
deiflaender 2022-05-10 13:20:57 +02:00
parent e49bbfca88
commit d2807e0ff1

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());
}