Fix suggest reviewers when requested without limit option
According to documentation default limit is used when limit is not passed (rest-api-changes.txt): "If result limit is not passed, then the default 10 is used." Without this change, limit field got not initialized properly when in an empty result in any case. Change-Id: I2fddcd589cb9c39d73499e6eaa927cacd21d33d7
This commit is contained in:
committed by
Dave Borowitz
parent
3862ba2897
commit
ad060ec871
@@ -115,6 +115,7 @@ public class SuggestReviewers implements RestReadView<ChangeResource> {
|
||||
this.reviewerSuggestionCache = reviewerSuggestionCache;
|
||||
this.maxSuggestedReviewers =
|
||||
cfg.getInt("suggest", "maxSuggestedReviewers", DEFAULT_MAX_SUGGESTED);
|
||||
this.limit = this.maxSuggestedReviewers;
|
||||
this.fullTextMaxMatches =
|
||||
cfg.getInt("suggest", "fullTextSearchMaxMatches",
|
||||
DEFAULT_MAX_MATCHES);
|
||||
|
||||
Reference in New Issue
Block a user