use of com.google.gerrit.server.notedb.ChangeNotes.Factory.ChangeNotesResult in project gerrit by GerritCodeReview.
the class VisibleChangesCache method visibleChangesByScan.
private void visibleChangesByScan() throws PermissionBackendException {
visibleChanges = new HashMap<>();
Project.NameKey p = projectState.getNameKey();
ImmutableList<ChangeNotesResult> changes;
try {
changes = changeNotesFactory.scan(repository, p).collect(toImmutableList());
} catch (IOException e) {
logger.atSevere().withCause(e).log("Cannot load changes for project %s, assuming no changes are visible", p);
return;
}
for (ChangeNotesResult notesResult : changes) {
ChangeNotes notes = toNotes(notesResult);
if (notes != null) {
visibleChanges.put(notes.getChangeId(), notes.getChange().getDest());
}
}
}
Aggregations