Merge origin/master

This commit is contained in:
LevelX2 2017-02-06 21:21:16 +01:00
commit b8cc0120cb
737 changed files with 1701 additions and 1729 deletions

View file

@ -233,7 +233,7 @@ public class User {
int minutes = (int) secondsLeft / 60;
int seconds = (int) secondsLeft % 60;
return new StringBuilder(sign).append(Integer.toString(minutes)).append(":").append(seconds > 9 ? seconds : "0" + Integer.toString(seconds)).toString();
return new StringBuilder(sign).append(Integer.toString(minutes)).append(':').append(seconds > 9 ? seconds : '0' + Integer.toString(seconds)).toString();
}
public long getSecondsDisconnected() {
@ -510,7 +510,7 @@ public class User {
}
if (!isConnected()) {
tournamentPlayer.setDisconnectInfo(" (discon. " + getDisconnectDuration() + ")");
tournamentPlayer.setDisconnectInfo(" (discon. " + getDisconnectDuration() + ')');
} else {
tournamentPlayer.setDisconnectInfo("");
}
@ -548,25 +548,25 @@ public class User {
tablesToDelete.clear();
}
if (waiting > 0) {
sb.append("Wait: ").append(waiting).append(" ");
sb.append("Wait: ").append(waiting).append(' ');
}
if (match > 0) {
sb.append("Match: ").append(match).append(" ");
sb.append("Match: ").append(match).append(' ');
}
if (sideboard > 0) {
sb.append("Sideb: ").append(sideboard).append(" ");
sb.append("Sideb: ").append(sideboard).append(' ');
}
if (draft > 0) {
sb.append("Draft: ").append(draft).append(" ");
sb.append("Draft: ").append(draft).append(' ');
}
if (construct > 0) {
sb.append("Const: ").append(construct).append(" ");
sb.append("Const: ").append(construct).append(' ');
}
if (tournament > 0) {
sb.append("Tourn: ").append(tournament).append(" ");
sb.append("Tourn: ").append(tournament).append(' ');
}
if (watchedGames.size() > 0) {
sb.append("Watch: ").append(watchedGames.size()).append(" ");
if (!watchedGames.isEmpty()) {
sb.append("Watch: ").append(watchedGames.size()).append(' ');
}
return sb.toString();
}
@ -587,7 +587,7 @@ public class User {
if (isConnected()) {
return pingInfo;
} else {
return " (discon. " + getDisconnectDuration() + ")";
return " (discon. " + getDisconnectDuration() + ')';
}
}
@ -666,10 +666,10 @@ public class User {
if (proto.getMatchesQuit() > 0) {
quit.add("Q:" + Integer.toString(proto.getMatchesQuit()));
}
if (quit.size() > 0) {
if (!quit.isEmpty()) {
builder.append(" (");
joinStrings(builder, quit, " ");
builder.append(")");
builder.append(')');
}
return builder.toString();
}
@ -698,10 +698,10 @@ public class User {
if (proto.getTourneysQuitDuringRound() > 0) {
quit.add("R:" + Integer.toString(proto.getTourneysQuitDuringRound()));
}
if (quit.size() > 0) {
if (!quit.isEmpty()) {
builder.append(" (");
joinStrings(builder, quit, " ");
builder.append(")");
builder.append(')');
}
return builder.toString();
}