private boolean findAndDeleteOthers(@Nullable String markup) throws IOException { boolean found = false; for (GHIssueComment comment : pr.listComments()) { if (myself.equals(comment.getUser().getLogin())) { if (markup == null || found || !markup.equals(comment.getBody())) { comment.delete(); continue; } if (markup.equals(comment.getBody())) { found = true; } } } return found; }