diff --git a/Mage.Client/src/main/java/mage/client/table/TablesPanel.java b/Mage.Client/src/main/java/mage/client/table/TablesPanel.java index 56dacd4e4c..59cdb09259 100644 --- a/Mage.Client/src/main/java/mage/client/table/TablesPanel.java +++ b/Mage.Client/src/main/java/mage/client/table/TablesPanel.java @@ -636,7 +636,7 @@ public class TablesPanel extends javax.swing.JPanel { List> ignoreListFilterList = new ArrayList<>(); String serverAddress = SessionHandler.getSession().getServerHostname().orElseGet(() -> ""); final Set ignoreListCopy = IgnoreList.ignoreList(serverAddress); - if (ignoreListCopy.size() > 0) { + if (!ignoreListCopy.isEmpty()) { ignoreListFilterList.add(new RowFilter() { @Override public boolean include(Entry entry) { diff --git a/Mage.Client/src/main/java/mage/client/util/IgnoreList.java b/Mage.Client/src/main/java/mage/client/util/IgnoreList.java index 8b0125dfd5..0fc95791b6 100644 --- a/Mage.Client/src/main/java/mage/client/util/IgnoreList.java +++ b/Mage.Client/src/main/java/mage/client/util/IgnoreList.java @@ -36,7 +36,7 @@ public final class IgnoreList { } public static String ignore(String serverAddress, String user) { - if (user == null || user.length() == 0) { + if (user == null || user.isEmpty()) { return ignoreListString(serverAddress); } @@ -71,7 +71,7 @@ public final class IgnoreList { } public static String unignore(String serverAddress, String user) { - if (user == null || user.length() == 0) { + if (user == null || user.isEmpty()) { return usage(); } if (MagePreferences.removeIgnoredUser(serverAddress, user)) { diff --git a/Mage.Client/src/main/java/mage/client/util/gui/ArrowBuilder.java b/Mage.Client/src/main/java/mage/client/util/gui/ArrowBuilder.java index 4a2b66979e..df4650ea3b 100644 --- a/Mage.Client/src/main/java/mage/client/util/gui/ArrowBuilder.java +++ b/Mage.Client/src/main/java/mage/client/util/gui/ArrowBuilder.java @@ -143,7 +143,7 @@ public class ArrowBuilder { if (map.containsKey(gameId)) { Map> innerMap = map.get(gameId); java.util.List arrows = innerMap.get(type); - if (arrows != null && arrows.size() > 0) { + if (arrows != null && !arrows.isEmpty()) { JPanel p = getArrowsPanel(gameId); synchronized (map) { for (Arrow arrow : arrows) { diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/CanadianHighlander.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/CanadianHighlander.java index 00ac1782ec..64372f5636 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/CanadianHighlander.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/CanadianHighlander.java @@ -67,7 +67,7 @@ public class CanadianHighlander extends Constructed { valid = false; } - if (deck.getSideboard().size() > 0) { + if (!deck.getSideboard().isEmpty()) { invalid.put("Deck", "Sideboard can't contain any cards: has " + (deck.getSideboard().size()) + " cards"); valid = false; }