Remove dead StarredChangesUtil.byAccount

IsStarredByLegacyPredicate is gone.

Change-Id: I5a055ec6469fa1af0d1395bc8a3d4a45f034d034
This commit is contained in:
Shawn Pearce
2017-06-26 13:41:24 -07:00
parent b323e9dfe1
commit 23436917b5

View File

@@ -280,22 +280,6 @@ public class StarredChangesUtil {
}
}
@Deprecated
// To be used only for IsStarredByLegacyPredicate.
public Set<Change.Id> byAccount(Account.Id accountId, String label) throws OrmException {
try (Repository repo = repoManager.openRepository(allUsers)) {
return getRefNames(repo, RefNames.REFS_STARRED_CHANGES)
.stream()
.filter(refPart -> refPart.endsWith("/" + accountId.get()))
.map(Change.Id::fromRefPart)
.filter(changeId -> hasStar(repo, changeId, accountId, label))
.collect(toSet());
} catch (IOException e) {
throw new OrmException(
String.format("Get changes that were starred by %d failed", accountId.get()), e);
}
}
private boolean hasStar(Repository repo, Change.Id changeId, Account.Id accountId, String label) {
try {
return readLabels(repo, RefNames.refsStarredChanges(changeId, accountId))