Merge "Expect UUID of comment to be URL encoded when posting a review"

This commit is contained in:
Edwin Kempin
2013-02-27 06:25:27 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 2 deletions

View File

@@ -1323,7 +1323,8 @@ comment.
|===========================
|Field Name ||Description
|`id` |optional|
The UUID of the comment if an existing draft comment should be updated.
The URL encoded UUID of the comment if an existing draft comment should
be updated.
|`side` |optional|
The side on which the comment should be added. +
Allowed values are `REVISION` and `PARENT`. +

View File

@@ -277,7 +277,7 @@ public class PostReview implements RestModifyView<RevisionResource, Input> {
String path = ent.getKey();
for (Comment c : ent.getValue()) {
String parent = Url.decode(c.inReplyTo);
PatchLineComment e = drafts.remove(c.id);
PatchLineComment e = drafts.remove(Url.decode(c.id));
boolean create = e == null;
if (create) {
e = new PatchLineComment(