diff --git a/Mage.Server/src/main/java/mage/server/UserManager.java b/Mage.Server/src/main/java/mage/server/UserManager.java index 0aaab44e74..f33b3fe054 100644 --- a/Mage.Server/src/main/java/mage/server/UserManager.java +++ b/Mage.Server/src/main/java/mage/server/UserManager.java @@ -27,15 +27,14 @@ */ package mage.server; +import java.util.*; +import java.util.concurrent.*; import mage.server.User.UserState; import mage.server.record.UserStats; import mage.server.record.UserStatsRepository; import mage.server.util.ThreadExecutor; import org.apache.log4j.Logger; -import java.util.*; -import java.util.concurrent.*; - /** * manages users - if a user is disconnected and 10 minutes have passed with no * activity the user is removed @@ -68,8 +67,7 @@ public enum UserManager { public Optional getUser(UUID userId) { if (!users.containsKey(userId)) { - LOGGER.error(String.format("User with id %s could not be found", userId)); - + LOGGER.trace(String.format("User with id %s could not be found", userId)); return Optional.empty(); } else { return Optional.of(users.get(userId)); @@ -82,10 +80,7 @@ public enum UserManager { if (u.isPresent()) { return u; } else { - - LOGGER.error("User with name " + userName + " could not be found"); return Optional.empty(); - } } @@ -123,8 +118,8 @@ public enum UserManager { public void removeUser(final UUID userId, final DisconnectReason reason) { if (userId != null) { - getUser(userId).ifPresent(user -> - USER_EXECUTOR.execute( + getUser(userId).ifPresent(user + -> USER_EXECUTOR.execute( () -> { try { LOGGER.info("USER REMOVE - " + user.getName() + " (" + reason.toString() + ") userId: " + userId + " [" + user.getGameInfo() + ']');