diff options
author | Matteo Mara <matteo.mara@sonarsource.com> | 2023-01-10 15:16:50 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-01-10 20:03:01 +0000 |
commit | 54b60b1adac5b703398163ee5edf5a621efc0d24 (patch) | |
tree | 2c4595fea6ddefca2b5f33cc9c26000ffb5750ce /server/sonar-webserver-es/src/testFixtures | |
parent | 295a87208f8c9898fbdc733a438587dc03a16877 (diff) | |
download | sonarqube-54b60b1adac5b703398163ee5edf5a621efc0d24.tar.gz sonarqube-54b60b1adac5b703398163ee5edf5a621efc0d24.zip |
[NO-JIRA] Remove reported code smells about usages of toList
Diffstat (limited to 'server/sonar-webserver-es/src/testFixtures')
-rw-r--r-- | server/sonar-webserver-es/src/testFixtures/java/org/sonar/server/permission/index/PermissionIndexerTester.java | 5 |
1 files changed, 2 insertions, 3 deletions
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> indexPermissions) { |