Rename PatchLineCommentComparator to PLC_ORDER
Change-Id: I26fd5cf4442e2bb1036bc6304c9e3e37902a0dc9
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user