mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
sonar cleanup in Sessionhandler
This commit is contained in:
parent
dab481ee17
commit
7a5920322d
1 changed files with 13 additions and 6 deletions
|
@ -14,6 +14,7 @@ import mage.remote.MageRemoteException;
|
|||
import mage.remote.Session;
|
||||
import mage.remote.SessionImpl;
|
||||
import mage.view.*;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
@ -22,9 +23,15 @@ import java.util.*;
|
|||
*/
|
||||
public final class SessionHandler {
|
||||
|
||||
|
||||
private static final Logger logger = Logger.getLogger(SessionHandler.class);
|
||||
|
||||
private static Session session;
|
||||
private static String lastConnectError = "";
|
||||
|
||||
private SessionHandler(){
|
||||
}
|
||||
|
||||
public static void startSession(MageFrame mageFrame) {
|
||||
|
||||
session = new SessionImpl(mageFrame);
|
||||
|
@ -181,7 +188,7 @@ public final class SessionHandler {
|
|||
try {
|
||||
return session.getTournament(tournamentId);
|
||||
} catch (MageRemoteException e) {
|
||||
e.printStackTrace();
|
||||
logger.info(e);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -275,7 +282,7 @@ public final class SessionHandler {
|
|||
try {
|
||||
return session.getRoomUsers(roomId);
|
||||
} catch (MageRemoteException e) {
|
||||
e.printStackTrace();
|
||||
logger.info(e);
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
@ -284,8 +291,8 @@ public final class SessionHandler {
|
|||
try {
|
||||
return session.getFinishedMatches(roomId);
|
||||
} catch (MageRemoteException e) {
|
||||
e.printStackTrace();
|
||||
return new ArrayList<>();
|
||||
logger.info(e);
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -301,8 +308,8 @@ public final class SessionHandler {
|
|||
try {
|
||||
return session.getTables(roomId);
|
||||
} catch (MageRemoteException e) {
|
||||
e.printStackTrace();
|
||||
return new ArrayList<>();
|
||||
logger.info(e);
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue