Merge "Notedb: Fix loading of range comments that start at char 0"

This commit is contained in:
Edwin Kempin
2015-11-10 19:53:52 +00:00
committed by Gerrit Code Review
2 changed files with 2 additions and 5 deletions

View File

@@ -243,9 +243,6 @@ public class CommentsInNotesUtil {
}
int startChar = RawParseUtils.parseBase10(note, ptr.value, ptr);
if (startChar == 0) {
return null;
}
if (note[ptr.value] == '-') {
range.setStartCharacter(startChar);
ptr.value += 1;

View File

@@ -690,7 +690,7 @@ public class ChangeNotesTest extends AbstractChangeNotesTest {
update.commit();
update = newUpdate(c, otherUser);
CommentRange range3 = new CommentRange(3, 1, 4, 1);
CommentRange range3 = new CommentRange(3, 0, 4, 1);
PatchLineComment comment3 = newPublishedComment(psId, "file2",
uuid3, range3, range3.getEndLine(), otherUser, null, time3, message3,
(short) 1, "abcd1234abcd1234abcd1234abcd1234abcd1234");
@@ -729,7 +729,7 @@ public class ChangeNotesTest extends AbstractChangeNotesTest {
+ "\n"
+ "File: file2\n"
+ "\n"
+ "3:1-4:1\n"
+ "3:0-4:1\n"
+ CommentsInNotesUtil.formatTime(serverIdent, time3) + "\n"
+ "Author: Other Account <2@gerrit>\n"
+ "UUID: uuid3\n"