* Match - Handling of building player names chnaged to fix out of memory error.

This commit is contained in:
LevelX2 2014-10-10 08:01:17 +02:00
parent 8c22756d9e
commit 8a8dea1f26

View file

@ -294,7 +294,17 @@ public abstract class MatchImpl implements Match {
playersInfo.append(currentPlayer.getName());
counter++;
currentPlayer = game.getPlayer(playerList.getNext());
if (counter > 10) {
logger.error("Can't get no correct player info from game");
logger.debug("- matchId: " + this.getId());
logger.debug("- gameId: " + game.getId());
StringBuilder sb = new StringBuilder();
for (MatchPlayer matchPlayer:this.getPlayers()) {
sb.append(matchPlayer.getName()).append(" - " );
}
logger.debug("- players: " + sb.toString());
break;
}
} while(!currentPlayer.getId().equals(game.getStartingPlayerId()));
} else {
playersInfo.append("[got no players]");