Rename PatchLineCommentComparator to PLC_ORDER

Change-Id: I26fd5cf4442e2bb1036bc6304c9e3e37902a0dc9
This commit is contained in:
Dave Borowitz
2015-04-29 07:46:32 -07:00
parent 0ddecca16c
commit 1d7de014a2
3 changed files with 3 additions and 3 deletions

View File

@@ -345,7 +345,7 @@ public class PatchLineCommentsUtil {
} }
private static List<PatchLineComment> sort(List<PatchLineComment> comments) { private static List<PatchLineComment> sort(List<PatchLineComment> comments) {
Collections.sort(comments, ChangeNotes.PatchLineCommentComparator); Collections.sort(comments, ChangeNotes.PLC_ORDER);
return comments; return comments;
} }
} }

View File

@@ -76,7 +76,7 @@ public class ChangeNotes extends AbstractChangeNotes<ChangeNotes> {
} }
}); });
public static Comparator<PatchLineComment> PatchLineCommentComparator = public static Comparator<PatchLineComment> PLC_ORDER =
new Comparator<PatchLineComment>() { new Comparator<PatchLineComment>() {
@Override @Override
public int compare(PatchLineComment c1, PatchLineComment c2) { public int compare(PatchLineComment c1, PatchLineComment c2) {

View File

@@ -531,7 +531,7 @@ public class CommentsInNotesUtil {
"No comments to write; to delete, use removeNoteFromNoteMap()."); "No comments to write; to delete, use removeNoteFromNoteMap().");
ObjectId commit = ObjectId commit =
ObjectId.fromString(allComments.get(0).getRevId().get()); ObjectId.fromString(allComments.get(0).getRevId().get());
Collections.sort(allComments, ChangeNotes.PatchLineCommentComparator); Collections.sort(allComments, ChangeNotes.PLC_ORDER);
noteMap.set(commit, inserter.insert(OBJ_BLOB, buildNote(allComments))); noteMap.set(commit, inserter.insert(OBJ_BLOB, buildNote(allComments)));
} }