From 8dd1a0fad0d4d80522c34f5238906132ee5fceb1 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 20 May 2013 10:51:45 +0200 Subject: [PATCH] Throwing exception if triggerdAbility == null. --- Mage/src/mage/players/PlayerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index 2ad0243667..0bba48e89e 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -751,7 +751,7 @@ public abstract class PlayerImpl> implements Player, Ser public boolean triggerAbility(TriggeredAbility source, Game game) { if (source == null) { log.warn("Null source in triggerAbility method"); - return false; + throw new IllegalArgumentException("source TriggeredAbility must not be null"); } //20091005 - 603.3c, 603.3d int bookmark = game.bookmarkState(); @@ -1065,6 +1065,7 @@ public abstract class PlayerImpl> implements Player, Ser } + @SuppressWarnings({"null", "ConstantConditions"}) private int doDamage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable, ArrayList appliedEffects) { if (damage > 0 && canDamage(game.getObject(sourceId), game)) { GameEvent event = new DamagePlayerEvent(playerId, sourceId, playerId, damage, preventable, combatDamage);