Combine ChangeNoteUtil and CommentsInNotesUtil

Now that we have to actually inject both of these into ChangeNotes,
it was getting a little unwieldy. There was practically nothing in
ChangeNoteUtil itself anyway. Merge CommentsInNotesUtil into
ChangeNoteUtil so we only have one thing to inject.

Change-Id: I41ef88dd2911b9d007f8b3a4cf7d3d7159fa25e6
This commit is contained in:
Dave Borowitz
2016-03-11 00:37:47 -05:00
parent f367b5d3ae
commit cf2fa7983f
15 changed files with 491 additions and 555 deletions

View File

@@ -63,7 +63,7 @@ class RevisionNote {
final ImmutableList<PatchLineComment> comments;
final String pushCert;
RevisionNote(CommentsInNotesUtil commentsUtil, Change.Id changeId,
RevisionNote(ChangeNoteUtil noteUtil, Change.Id changeId,
ObjectReader reader, ObjectId noteId, boolean draftsOnly)
throws ConfigInvalidException, IOException {
byte[] bytes = reader.open(noteId, OBJ_BLOB).getCachedBytes(MAX_NOTE_SZ);
@@ -79,6 +79,6 @@ class RevisionNote {
? PatchLineComment.Status.DRAFT
: PatchLineComment.Status.PUBLISHED;
comments = ImmutableList.copyOf(
commentsUtil.parseNote(bytes, p, changeId, status));
noteUtil.parseNote(bytes, p, changeId, status));
}
}