Merge "Notedb: Fix loading of draft comment refs"

This commit is contained in:
Edwin Kempin
2015-11-10 19:54:34 +00:00
committed by Gerrit Code Review
4 changed files with 35 additions and 9 deletions

View File

@@ -88,6 +88,17 @@ public class RefNames {
public static String refsDraftComments(Account.Id accountId,
Change.Id changeId) {
StringBuilder r = buildRefsDraftCommentsPrefix(accountId);
r.append(changeId.get());
return r.toString();
}
public static String refsDraftCommentsPrefix(Account.Id accountId) {
return buildRefsDraftCommentsPrefix(accountId).toString();
}
public static StringBuilder buildRefsDraftCommentsPrefix(
Account.Id accountId) {
StringBuilder r = new StringBuilder();
r.append(REFS_DRAFT_COMMENTS);
int n = accountId.get() % 100;
@@ -98,8 +109,7 @@ public class RefNames {
r.append('/');
r.append(accountId.get());
r.append('-');
r.append(changeId.get());
return r.toString();
return r;
}
/**