Fix trivial usages of deprecated RefDatabase.getRefs method
getRefs(String) returns Map<String, Ref>; most callers only call its values() method and iterate over the list of Ref objects. It's trivial to replace those calls with getRefsByPrefix which returns a List<Ref>. Change-Id: Iad142ea8a0dec69b22fcec084bb66eafd79c2a0d
This commit is contained in:
@@ -498,7 +498,7 @@ public class CommentsUtil {
|
||||
}
|
||||
|
||||
private Collection<Ref> getDraftRefs(Repository repo, Change.Id changeId) throws IOException {
|
||||
return repo.getRefDatabase().getRefs(RefNames.refsDraftCommentsPrefix(changeId)).values();
|
||||
return repo.getRefDatabase().getRefsByPrefix(RefNames.refsDraftCommentsPrefix(changeId));
|
||||
}
|
||||
|
||||
private static <T extends Comment> List<T> sort(List<T> comments) {
|
||||
|
||||
Reference in New Issue
Block a user