diff --git a/Mage.Tests/src/test/java/org/mage/test/utils/CardHintsTest.java b/Mage.Tests/src/test/java/org/mage/test/utils/CardHintsTest.java index 2664737b5203..92d2cb1c7574 100644 --- a/Mage.Tests/src/test/java/org/mage/test/utils/CardHintsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/utils/CardHintsTest.java @@ -16,6 +16,9 @@ import java.util.List; import java.util.stream.Collectors; +/** + * @author JayDi85 + */ public class CardHintsTest extends CardTestCommanderDuelBase { // html logs/names used all around xmage (game logs, chats, choose dialogs, etc) @@ -114,7 +117,7 @@ public void test_ObjectNamesInHtml() { setStopAt(1, PhaseStep.DECLARE_ATTACKERS); execute(); - // colleat all possible objects and test logs with it + // collect all possible objects and test logs with it List sampleObjects = new ArrayList<>(); sampleObjects.addAll(currentGame.getBattlefield().getAllPermanents()); sampleObjects.addAll(playerA.getHand().getCards(currentGame)); diff --git a/Mage/src/main/java/mage/abilities/condition/common/SourceMatchesFilterCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceMatchesFilterCondition.java index 95f803651432..f0ab7eaa1b7b 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/SourceMatchesFilterCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/SourceMatchesFilterCondition.java @@ -21,6 +21,9 @@ public SourceMatchesFilterCondition(FilterPermanent filter) { } public SourceMatchesFilterCondition(String text, FilterPermanent filter) { + if (filter == null) { + throw new IllegalArgumentException("Wrong code usage: filter param can't be empty"); + } this.FILTER = filter; this.text = text; }