Fixed a problem with NPE and match start. Chanes to handling of logging.

This commit is contained in:
LevelX2 2014-09-09 07:45:53 +02:00
parent f670cb3977
commit 9c1f69983b
4 changed files with 18 additions and 15 deletions

View file

@ -821,19 +821,18 @@ public class TableController {
int humanPlayers = 0;
int aiPlayers = 0 ;
int validHumanPlayers = 0;
if (match == null && !(table.getState().equals(TableState.WAITING) ||
table.getState().equals(TableState.STARTING) ||
table.getState().equals(TableState.READY_TO_START) )) {
logger.debug("- Match table with no match:");
logger.debug("-- matchId:" + match.getId() + " [" + match.getName() + "]");
// return false;
}
if (match.isDoneSideboarding()) {
if (match.getGame() == null) {
// no sideboarding and not active game -> match seems to hang (maybe the Draw bug)
logger.debug("- Match with no active game and not in sideboard state:");
if (!(table.getState().equals(TableState.WAITING) || table.getState().equals(TableState.STARTING) || table.getState().equals(TableState.READY_TO_START))) {
if (match == null) {
logger.debug("- Match table with no match:");
logger.debug("-- matchId:" + match.getId() + " [" + match.getName() + "]");
// return false;
} else {
if (match.isDoneSideboarding() && match.getGame() == null) {
// no sideboarding and not active game -> match seems to hang (maybe the Draw bug)
logger.debug("- Match with no active game and not in sideboard state:");
logger.debug("-- matchId:" + match.getId() + " [" + match.getName() + "]");
// return false;
}
}
}
// check for active players