use of com.google.gerrit.server.change.ChangeEditResource in project gerrit by GerritCodeReview.
the class ChangeEditApiImpl method getFile.
@Override
public Optional<BinaryResult> getFile(String filePath) throws RestApiException {
try {
ChangeEditResource changeEditResource = getChangeEditResource(filePath);
Response<BinaryResult> fileResponse = changeEditsGet.apply(changeEditResource);
return fileResponse.isNone() ? Optional.empty() : Optional.of(fileResponse.value());
} catch (Exception e) {
throw asRestApiException("Cannot retrieve file of change edit", e);
}
}
Aggregations