removing unnecessary condition

L152, null checking for initialized final field
This commit is contained in:
MusaBrt 2020-11-18 01:11:31 +03:00 committed by GitHub
parent 3dc720848d
commit e078644caf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -149,15 +149,13 @@ public enum CopyPasteImageSource implements CardImageSource {
viewMissingCards = false;
String displayMissingCardsStr = "Up to the first 20 cards are:\n";
String missingCardsStr = "";
if (this.missingCards != null) {
for (String card : this.missingCards) {
if (count < 20) {
displayMissingCardsStr = displayMissingCardsStr + card + "\n";
}
missingCardsStr = missingCardsStr + card + "\n";
count++;
for (String card : this.missingCards) {
if (count < 20) {
displayMissingCardsStr = displayMissingCardsStr + card + "\n";
}
missingCardsStr = missingCardsStr + card + "\n";
count++;
}
StringSelection stringSelection = new StringSelection(missingCardsStr);
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();