From 54b60b1adac5b703398163ee5edf5a621efc0d24 Mon Sep 17 00:00:00 2001 From: Matteo Mara Date: Tue, 10 Jan 2023 15:16:50 +0100 Subject: [NO-JIRA] Remove reported code smells about usages of toList --- .../org/sonar/server/permission/index/PermissionIndexerTester.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'server/sonar-webserver-es/src/testFixtures') diff --git a/server/sonar-webserver-es/src/testFixtures/java/org/sonar/server/permission/index/PermissionIndexerTester.java b/server/sonar-webserver-es/src/testFixtures/java/org/sonar/server/permission/index/PermissionIndexerTester.java index 870180f43ce..fa02817876f 100644 --- a/server/sonar-webserver-es/src/testFixtures/java/org/sonar/server/permission/index/PermissionIndexerTester.java +++ b/server/sonar-webserver-es/src/testFixtures/java/org/sonar/server/permission/index/PermissionIndexerTester.java @@ -27,7 +27,6 @@ import org.sonar.db.user.UserDto; import org.sonar.server.es.EsTester; import static java.util.Arrays.stream; -import static java.util.stream.Collectors.toList; public class PermissionIndexerTester { @@ -39,7 +38,7 @@ public class PermissionIndexerTester { } public PermissionIndexerTester allowOnlyAnyone(ComponentDto... projects) { - return allow(stream(projects).map(project -> new IndexPermissions(project.uuid(), project.qualifier()).allowAnyone()).collect(toList())); + return allow(stream(projects).map(project -> new IndexPermissions(project.uuid(), project.qualifier()).allowAnyone()).toList()); } public PermissionIndexerTester allowOnlyUser(ComponentDto project, UserDto user) { @@ -55,7 +54,7 @@ public class PermissionIndexerTester { } public PermissionIndexerTester allow(IndexPermissions... indexPermissions) { - return allow(stream(indexPermissions).collect(toList())); + return allow(stream(indexPermissions).toList()); } public PermissionIndexerTester allow(List indexPermissions) { -- cgit v1.2.3