diff --git a/Documentation/rest-api-changes.txt b/Documentation/rest-api-changes.txt index 0d0d27bbe1..4c599f141c 100644 --- a/Documentation/rest-api-changes.txt +++ b/Documentation/rest-api-changes.txt @@ -1553,7 +1553,6 @@ link:#review-input[ReviewInput] entity. "end_line": 55, "end_character": 20 }, - "line": 55, "message": "Incorrect indentation" } ] @@ -2900,7 +2899,7 @@ If not set, the default is `REVISION`. The number of the line for which the comment should be added. + `0` if it is a file comment. + If neither line nor range is set, a file comment is added. + -If range is set, this should equal the end line of the range. +If range is set, this value is ignored in favor of the `end_line` of the range. |`range` |optional| The range of the comment as a link:#comment-range[CommentRange] entity. diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java index 25c63b5d11..022538796c 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java @@ -339,6 +339,7 @@ public class PostReview implements RestModifyView c.range.startCharacter, c.range.endLine, c.range.endCharacter)); + e.setLine(c.range.endLine); } ups.add(e); }