Files
gerrit/java/com/google/gerrit/server/restapi
Gal Paikin b3256183e1 Assume a comment is a robot comment when not found
Currently, when we don't find a comment, we throw IllegalStateException.
Unfortunately, this is not true since in those cases, the comment
that is missing is actually just a robot comment.

This was needed in CommentsUtil#newHumanComment, which always had a bug
that was just not noticed since we usually create new comments using
draft comments. When a comment has a parent robot comment, and
unresolved is unset, we wouldn't find any comment (although the id is
valid, since it belongs to a robot comment).

Also, needed in CommentsUtil#getAllCommentsInCommentThreads, since going
through all the user's comments descendants, we may get into a robot
comment, which we should ignore.

As a follow-up change, in some of those places it's reasonable to also
search for the robot comment, and then throw IllegalStateException if
the comment is neither human nor robot comment.

Change-Id: I06db2d8f3ab0fa01c4962f8d1b081f6811d6982a
2020-08-20 13:06:50 +03:00
..
2020-07-23 13:08:51 +02:00
2020-07-23 13:08:51 +02:00
2020-07-17 15:01:37 +02:00