From b75b83039981123131869f93b20c4f0dc6f26777 Mon Sep 17 00:00:00 2001 From: Sergey Nuyanzin Date: Fri, 17 Nov 2023 13:18:28 +0100 Subject: [PATCH] Use set for roles Signed-off-by: Sergey Nuyanzin --- core/src/main/java/io/aiven/klaw/service/MailUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/io/aiven/klaw/service/MailUtils.java b/core/src/main/java/io/aiven/klaw/service/MailUtils.java index a51bcca5de..0fd52a5805 100644 --- a/core/src/main/java/io/aiven/klaw/service/MailUtils.java +++ b/core/src/main/java/io/aiven/klaw/service/MailUtils.java @@ -11,10 +11,12 @@ import io.aiven.klaw.model.enums.MailType; import io.aiven.klaw.model.enums.PermissionType; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; +import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import lombok.extern.slf4j.Slf4j; @@ -635,7 +637,7 @@ private List getAllUsersWithPermissionToApproveRequest( Map> rolesToPermissions = manageDatabase.getRolesPermissionsPerTenant(tenantId); - List roles = new ArrayList<>(); + Set roles = new HashSet<>(); rolesToPermissions.forEach( (k, v) -> {