aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-auth
diff options
context:
space:
mode:
authorPierre <pierre.guillot@sonarsource.com>2023-07-06 16:18:13 +0200
committersonartech <sonartech@sonarsource.com>2023-07-17 20:03:45 +0000
commit1ade7f5774b98e129d2a79e6adf7450861e5ba9e (patch)
tree7e3c3f403abed0aef6d2d1ed9273bc250601109b /server/sonar-webserver-auth
parentb3b0e8a33f1ce672b54e75c7e14e4b708285e64f (diff)
downloadsonarqube-1ade7f5774b98e129d2a79e6adf7450861e5ba9e.tar.gz
sonarqube-1ade7f5774b98e129d2a79e6adf7450861e5ba9e.zip
NO-JIRA replace MoreCollectors.toSet(size) with Collectors.toSet
Diffstat (limited to 'server/sonar-webserver-auth')
-rw-r--r--server/sonar-webserver-auth/src/main/java/org/sonar/server/user/ServerUserSession.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/ServerUserSession.java b/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/ServerUserSession.java
index 33d1ddb72e2..96af8cc804e 100644
--- a/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/ServerUserSession.java
+++ b/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/ServerUserSession.java
@@ -34,7 +34,6 @@ import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
import org.sonar.api.resources.Qualifiers;
import org.sonar.api.resources.Scopes;
-import org.sonar.core.util.stream.MoreCollectors;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.component.BranchDto;
@@ -340,7 +339,7 @@ public class ServerUserSession extends AbstractUserSession {
}
return permissionKeys.stream()
.map(GlobalPermission::fromKey)
- .collect(MoreCollectors.toSet(permissionKeys.size()));
+ .collect(toSet());
}
private Set<String> loadDbPermissions(DbSession dbSession, String entityUuid) {
@@ -383,7 +382,7 @@ public class ServerUserSession extends AbstractUserSession {
Set<String> copyComponentsUuid = components.stream()
.map(ComponentDto::getCopyComponentUuid)
.filter(Objects::nonNull)
- .collect(MoreCollectors.toSet(components.size()));
+ .collect(toSet());
return dbClient.componentDao().selectByUuids(dbSession, copyComponentsUuid).stream()
.collect(Collectors.toMap(ComponentDto::uuid, componentDto -> componentDto));
}