From fbb04206acda07bbc93cfd36505878d53e658bf0 Mon Sep 17 00:00:00 2001 From: Belen Pruvost Date: Mon, 7 Feb 2022 10:55:52 -0300 Subject: [PATCH] [NO-JIRA] Improving logs for when a user is added to a group --- .../org/sonar/server/authentication/UserRegistrarImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/sonar-webserver-auth/src/main/java/org/sonar/server/authentication/UserRegistrarImpl.java b/server/sonar-webserver-auth/src/main/java/org/sonar/server/authentication/UserRegistrarImpl.java index 84b6fc74481..0a7c66a1f9b 100644 --- a/server/sonar-webserver-auth/src/main/java/org/sonar/server/authentication/UserRegistrarImpl.java +++ b/server/sonar-webserver-auth/src/main/java/org/sonar/server/authentication/UserRegistrarImpl.java @@ -203,7 +203,7 @@ public class UserRegistrarImpl implements UserRegistrar { private void addGroups(DbSession dbSession, UserDto userDto, Collection groupsToAdd, Map groupsByName) { groupsToAdd.stream().map(groupsByName::get).filter(Objects::nonNull).forEach( groupDto -> { - LOGGER.debug("Adding group '{}' to user '{}'", groupDto.getName(), userDto.getLogin()); + LOGGER.debug("Adding user '{}' to group '{}'", userDto.getLogin(), groupDto.getName()); dbClient.userGroupDao().insert(dbSession, new UserGroupDto().setGroupUuid(groupDto.getUuid()).setUserUuid(userDto.getUuid()), groupDto.getName(), userDto.getLogin()); }); @@ -250,7 +250,7 @@ public class UserRegistrarImpl implements UserRegistrar { } private static UserDto[] toArray(Optional userDto) { - return userDto.map(u -> new UserDto[] {u}).orElse(new UserDto[] {}); + return userDto.map(u -> new UserDto[]{u}).orElse(new UserDto[]{}); } private static AuthenticationException generateExistingEmailError(UserRegistration authenticatorParameters, String email) { -- 2.39.5