Rename maxTerms local variable to maxLimit to remove potential confusion

Doing so since maxTerms is a true index config parameter, differing from
its maxLimit sibling. Here the latter is the one being used as the value
for that local variable, hence the renaming.

Change-Id: I476adf1414bbba02c2a7c912aff0cd369eff44b1
This commit is contained in:
Marco Miller
2016-02-02 14:52:02 -05:00
parent d2f6e98ff1
commit f080fedaa7

View File

@@ -623,10 +623,10 @@ public class ChangeQueryBuilder extends QueryBuilder<ChangeData> {
return new Account.Id(accountInfo._accountId);
}
}));
int maxTerms = args.indexConfig.maxLimit();
if (allMembers.size() > maxTerms) {
int maxLimit = args.indexConfig.maxLimit();
if (allMembers.size() > maxLimit) {
// limit the number of query terms otherwise Gerrit will barf
accounts = ImmutableSet.copyOf(Iterables.limit(allMembers, maxTerms));
accounts = ImmutableSet.copyOf(Iterables.limit(allMembers, maxLimit));
} else {
accounts = allMembers;
}