class IssueManager {

    @Transactional(propagation = Propagation.REQUIRED)
    public IssueComment deleteComment(Long issueId, Long commentId) {
        loadIssueAndCheckIfNotClosed(issueId);
        Optional<IssueComment> comment = commentDao.loadComment(commentId);
        comment.ifPresent(loadedComment -> {
            validateIssueId(issueId, loadedComment);
            attachmentFileManager.deleteAttachments(attachmentDao.loadAttachmentsByCommentIds(
                Collections.singletonList(commentId)).getOrDefault(commentId, Collections.emptyList()));
            commentDao.deleteComment(commentId);
        });
        return comment.orElseThrow(getCommentNotFoundException(commentId));
    }

}