]> source.dussan.org Git - sonarqube.git/commitdiff
Fix tags dropdown in issue bulk change
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Tue, 24 Mar 2015 13:04:07 +0000 (14:04 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Tue, 24 Mar 2015 14:36:46 +0000 (15:36 +0100)
server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java

index ea847c6e0959e33568f22d737aa6ef1e67bdc682..bbc138aa8581ccf8053d279021f2f34fc0bc4e3b 100644 (file)
@@ -586,7 +586,7 @@ public class IssueIndex extends BaseIndex {
     result.addAll(EsUtils.termsKeys(issuesResult));
     result.addAll(EsUtils.termsKeys(rulesResult));
     List<String> 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<String, Long> countTags(IssueQuery query, int maxNumberOfTags) {