aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-auth
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-auth
parentc9aa7b5f35066a7c2e3583eb679062d142977beb (diff)
downloadsonarqube-b6cb156530b5012f589d097fbbe84b855391accc.tar.gz
sonarqube-b6cb156530b5012f589d097fbbe84b855391accc.zip
[NO-JIRA] explicitly declare toList collector mutable or not
Diffstat (limited to 'server/sonar-webserver-auth')
-rw-r--r--server/sonar-webserver-auth/src/main/java/org/sonar/server/usertoken/notification/TokenExpirationNotificationSender.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/sonar-webserver-auth/src/main/java/org/sonar/server/usertoken/notification/TokenExpirationNotificationSender.java b/server/sonar-webserver-auth/src/main/java/org/sonar/server/usertoken/notification/TokenExpirationNotificationSender.java
index c5005990651..d331d3c477b 100644
--- a/server/sonar-webserver-auth/src/main/java/org/sonar/server/usertoken/notification/TokenExpirationNotificationSender.java
+++ b/server/sonar-webserver-auth/src/main/java/org/sonar/server/usertoken/notification/TokenExpirationNotificationSender.java
@@ -46,7 +46,7 @@ public class TokenExpirationNotificationSender {
try (var dbSession = dbClient.openSession(false)) {
var expiringTokens = dbClient.userTokenDao().selectTokensExpiredInDays(dbSession, 7);
var expiredTokens = dbClient.userTokenDao().selectTokensExpiredInDays(dbSession, 0);
- var tokensToNotify = Stream.concat(expiringTokens.stream(), expiredTokens.stream()).collect(Collectors.toList());
+ var tokensToNotify = Stream.concat(expiringTokens.stream(), expiredTokens.stream()).toList();
var usersToNotify = tokensToNotify.stream().map(UserTokenDto::getUserUuid).collect(Collectors.toSet());
Map<String, String> userUuidToEmail = dbClient.userDao().selectByUuids(dbSession, usersToNotify).stream()
.collect(Collectors.toMap(UserDto::getUuid, UserDto::getEmail));