aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce-task-projectanalysis
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-ce-task-projectanalysis')
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/ComponentTreeBuilder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/ComponentTreeBuilder.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/ComponentTreeBuilder.java
index de1daa2c153..427bb87bd52 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/ComponentTreeBuilder.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/ComponentTreeBuilder.java
@@ -21,13 +21,13 @@ package org.sonar.ce.task.projectanalysis.component;
import java.util.List;
import java.util.function.Function;
-import java.util.stream.Collectors;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import org.sonar.ce.task.projectanalysis.analysis.Branch;
+import org.sonar.core.util.stream.MoreCollectors;
import org.sonar.db.component.SnapshotDto;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReport.Component.FileStatus;
-import org.sonar.ce.task.projectanalysis.analysis.Branch;
import org.sonar.server.project.Project;
import static com.google.common.base.MoreObjects.firstNonNull;
@@ -88,7 +88,7 @@ public class ComponentTreeBuilder {
.stream()
.map(scannerComponentSupplier::apply)
.map(c -> buildComponent(c, parentModule, projectScmPath))
- .collect(Collectors.toList());
+ .collect(MoreCollectors.toList(component.getChildRefCount()));
}
private ComponentImpl buildComponent(ScannerReport.Component component, ScannerReport.Component closestModule,