aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-core/src
diff options
context:
space:
mode:
authorZipeng WU <zipeng.wu@sonarsource.com>2023-01-12 15:07:29 +0100
committersonartech <sonartech@sonarsource.com>2023-01-13 20:02:46 +0000
commitb6cb156530b5012f589d097fbbe84b855391accc (patch)
treef2e9484644bef2e38c29712da190875863346cb5 /server/sonar-webserver-core/src
parentc9aa7b5f35066a7c2e3583eb679062d142977beb (diff)
downloadsonarqube-b6cb156530b5012f589d097fbbe84b855391accc.tar.gz
sonarqube-b6cb156530b5012f589d097fbbe84b855391accc.zip
[NO-JIRA] explicitly declare toList collector mutable or not
Diffstat (limited to 'server/sonar-webserver-core/src')
-rw-r--r--server/sonar-webserver-core/src/main/java/org/sonar/server/issue/index/AsyncIssueIndexingImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/issue/index/AsyncIssueIndexingImpl.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/issue/index/AsyncIssueIndexingImpl.java
index a0a4b8f0206..8918d48bd2a 100644
--- a/server/sonar-webserver-core/src/main/java/org/sonar/server/issue/index/AsyncIssueIndexingImpl.java
+++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/issue/index/AsyncIssueIndexingImpl.java
@@ -41,6 +41,7 @@ import org.sonar.db.component.BranchDto;
import org.sonar.db.component.BranchType;
import org.sonar.db.component.SnapshotDto;
+import static java.util.stream.Collectors.toCollection;
import static org.sonar.db.ce.CeTaskCharacteristicDto.BRANCH_KEY;
import static org.sonar.db.ce.CeTaskCharacteristicDto.BRANCH_TYPE_KEY;
import static org.sonar.db.ce.CeTaskCharacteristicDto.PULL_REQUEST;
@@ -75,7 +76,7 @@ public class AsyncIssueIndexingImpl implements AsyncIssueIndexing {
return;
}
- List<String> projectUuids = branchInNeedOfIssueSync.stream().map(BranchDto::getProjectUuid).distinct().collect(Collectors.toList());
+ List<String> projectUuids = branchInNeedOfIssueSync.stream().map(BranchDto::getProjectUuid).distinct().collect(toCollection(ArrayList<String>::new));
LOG.info("{} projects found in need of issue sync.", projectUuids.size());
sortProjectUuids(dbSession, projectUuids);