private void removeForUnpublishedArticles(final List<JSONObject> comments) throws RepositoryException {
LOGGER.finer("Removing unpublished articles' comments....");
final Iterator<JSONObject> iterator = comments.iterator();
while (iterator.hasNext()) {
final JSONObject comment = iterator.next();
final String commentOnType = comment.optString(Comment.COMMENT_ON_TYPE);
if (Article.ARTICLE.equals(commentOnType)) {
final String articleId = comment.optString(Comment.COMMENT_ON_ID);
if (!articleRepository.isPublished(articleId)) {
iterator.remove();