From: Jean-Baptiste Lievremont Date: Tue, 24 Mar 2015 13:04:07 +0000 (+0100) Subject: Fix tags dropdown in issue bulk change X-Git-Tag: 5.1~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9f0fce00cd2815a8047ef170b84c215f7879cc1d;p=sonarqube.git Fix tags dropdown in issue bulk change --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java index ea847c6e095..bbc138aa858 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java @@ -586,7 +586,7 @@ public class IssueIndex extends BaseIndex { result.addAll(EsUtils.termsKeys(issuesResult)); result.addAll(EsUtils.termsKeys(rulesResult)); List resultAsList = Lists.newArrayList(result); - return resultAsList.size() > maxNumberOfTags ? resultAsList.subList(0, maxNumberOfTags) : resultAsList; + return resultAsList.size() > maxNumberOfTags && maxNumberOfTags > 0 ? resultAsList.subList(0, maxNumberOfTags) : resultAsList; } public Map countTags(IssueQuery query, int maxNumberOfTags) {