Github user nickwallen commented on a diff in the pull request: https://github.com/apache/metron/pull/1190#discussion_r216739478 --- Diff: metron-platform/metron-solr/src/main/java/org/apache/metron/solr/dao/SolrUpdateDao.java --- @@ -149,21 +151,21 @@ public void addCommentToAlert(CommentAddRemoveRequest request, Document latest) Document newVersion = new Document(latest); newVersion.getDocument().put(COMMENTS_FIELD, commentStrs); - update(newVersion, Optional.empty()); + return update(newVersion, Optional.empty()); } @Override - public void removeCommentFromAlert(CommentAddRemoveRequest request) + public Document removeCommentFromAlert(CommentAddRemoveRequest request) throws IOException { Document latest = retrieveLatestDao.getLatest(request.getGuid(), request.getSensorType()); - removeCommentFromAlert(request, latest); + return removeCommentFromAlert(request, latest); } @Override - public void removeCommentFromAlert(CommentAddRemoveRequest request, Document latest) + public Document removeCommentFromAlert(CommentAddRemoveRequest request, Document latest) throws IOException { if (latest == null) { - return; + return null; --- End diff -- Should we also treat this as an exceptional condition too?
---