small fixes after comments

This commit is contained in:
Goudt 2017-01-18 23:59:19 +01:00
parent a522930592
commit 84081cbece
2 changed files with 5 additions and 1 deletions

View file

@ -373,7 +373,7 @@ public class Session {
} catch (HandleCallbackException ex) {
ex.printStackTrace();
UserManager.getInstance().getUser(userId).ifPresent(user-> {
logger.warn("SESSION CALLBACK EXCEPTION - " + (user != null ? user.getName() : "") + " userId " + userId);
logger.warn("SESSION CALLBACK EXCEPTION - " + user.getName() + " userId " + userId);
logger.warn(" - method: " + call.getMethod());
logger.warn(" - cause: " + getBasicCause(ex).toString());
logger.trace("Stack trace:", ex);

View file

@ -313,6 +313,10 @@ public class GameController implements GameCallback {
logger.fatal("- userId: " + userId);
return;
}
if(!user.isPresent(){
logger.fatal("User not found : "+userId);
return;
}
Player player = game.getPlayer(playerId);
if (player == null) {
logger.fatal("Player not found - playerId: " + playerId);