mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 04:22:01 -08:00
Tests: added test to check copy() methods removes;
This commit is contained in:
parent
1c2f5d7940
commit
b8782d572d
2 changed files with 34 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import java.util.UUID;
|
|||
import mage.constants.WatcherScope;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -17,6 +18,8 @@ import mage.game.events.GameEvent;
|
|||
*/
|
||||
public abstract class Watcher implements Serializable {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(Watcher.class);
|
||||
|
||||
protected UUID controllerId;
|
||||
protected UUID sourceId;
|
||||
protected boolean condition;
|
||||
|
|
@ -84,7 +87,7 @@ public abstract class Watcher implements Serializable {
|
|||
constructor.setAccessible(true);
|
||||
return (T) constructor.newInstance(this);
|
||||
} catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Can't copy watcher: " + e.getMessage(), e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue