use of com.google.gerrit.reviewdb.client.FixSuggestion in project gerrit by GerritCodeReview.
the class Fixes method parse.
@Override
public FixResource parse(RevisionResource revisionResource, IdString id) throws ResourceNotFoundException, OrmException {
String fixId = id.get();
ChangeNotes changeNotes = revisionResource.getNotes();
List<RobotComment> robotComments = commentsUtil.robotCommentsByPatchSet(changeNotes, revisionResource.getPatchSet().getId());
for (RobotComment robotComment : robotComments) {
for (FixSuggestion fixSuggestion : robotComment.fixSuggestions) {
if (Objects.equals(fixId, fixSuggestion.fixId)) {
return new FixResource(revisionResource, fixSuggestion.replacements);
}
}
}
throw new ResourceNotFoundException(id);
}
Aggregations