Revert "introduced StringUtil class with .isEmpty(String input) and .isNotEmp…"

This commit is contained in:
LevelX2 2016-09-16 23:55:54 +02:00 committed by GitHub
parent 18e771ccd5
commit d7dd635bca
51 changed files with 96 additions and 294 deletions

View file

@ -405,25 +405,33 @@ public class NewTableDialog extends MageDialog {
JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Error creating table.", "Error", JOptionPane.ERROR_MESSAGE);
return;
}
if (SessionHandler.joinTable(
roomId,
table.getTableId(),
this.player1Panel.getPlayerName(),
"Human", 1,
DeckImporterUtil.importDeck(this.player1Panel.getDeckFile()),
this.txtPassword.getText())) {
for (TablePlayerPanel player : players) {
if (!player.getPlayerType().equals("Human")) {
if (!player.joinTable(roomId, table.getTableId())) {
// error message must be send by the server
SessionHandler.removeTable(roomId, table.getTableId());
table = null;
return;
try {
if (SessionHandler.joinTable(
roomId,
table.getTableId(),
this.player1Panel.getPlayerName(),
"Human", 1,
DeckImporterUtil.importDeck(this.player1Panel.getDeckFile()),
this.txtPassword.getText())) {
for (TablePlayerPanel player : players) {
if (!player.getPlayerType().equals("Human")) {
if (!player.joinTable(roomId, table.getTableId())) {
// error message must be send by the server
SessionHandler.removeTable(roomId, table.getTableId());
table = null;
return;
}
}
}
this.hideDialog();
return;
}
this.hideDialog();
return;
} catch (FileNotFoundException ex) {
handleError(ex);
} catch (IOException ex) {
handleError(ex);
} catch (ClassNotFoundException ex) {
handleError(ex);
}
// JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Error joining table.", "Error", JOptionPane.ERROR_MESSAGE);
SessionHandler.removeTable(roomId, table.getTableId());