Refactoring - Version stable

This commit is contained in:
dahoud
2026-03-28 14:21:30 +00:00
parent 00b981c510
commit a740c172ef
4402 changed files with 88517 additions and 1555 deletions

View File

@@ -101,7 +101,7 @@ public class AdminUserService {
List<String> currentNames = getUserRoles(userId).stream()
.map(RoleDTO::getName)
.collect(Collectors.toList());
List<String> toAssign = targetRoleNames == null ? List.of() : new ArrayList<>(targetRoleNames);
List<String> toAssign = new ArrayList<>(targetRoleNames != null ? targetRoleNames : List.of());
toAssign.removeAll(currentNames);
List<String> toRevoke = new ArrayList<>(currentNames);
toRevoke.removeAll(targetRoleNames == null ? List.of() : targetRoleNames);