use of com.google.gerrit.server.patch.PatchListKey in project gerrit by GerritCodeReview.
the class ChangeData method getDiffSummary.
private Optional<DiffSummary> getDiffSummary() {
if (diffSummary == null) {
if (!lazyload()) {
return Optional.empty();
}
Change c = change();
PatchSet ps = currentPatchSet();
if (c == null || ps == null || !loadCommitData()) {
return Optional.empty();
}
PatchListKey pk = PatchListKey.againstBase(ps.commitId(), parentCount);
DiffSummaryKey key = DiffSummaryKey.fromPatchListKey(pk);
try {
diffSummary = Optional.of(patchListCache.getDiffSummary(key, c.getProject()));
} catch (PatchListNotAvailableException e) {
diffSummary = Optional.empty();
}
}
return diffSummary;
}
Aggregations