Bugfixes with != instead of equals and default toString calls

This commit is contained in:
vraskulin 2017-02-15 19:52:20 +03:00
parent 752392fc46
commit a15220d51e
74 changed files with 187 additions and 147 deletions

View file

@ -27,14 +27,8 @@
*/
package mage.game.permanent;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.*;
import mage.MageObject;
import mage.MageObjectReference;
import mage.ObjectColor;
@ -667,7 +661,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
@Override
public void attachTo(UUID permanentId, Game game) {
if (this.attachedTo != null && this.attachedTo != permanentId) {
if (this.attachedTo != null && !Objects.equals(this.attachedTo, permanentId)) {
Permanent attachment = game.getPermanent(this.attachedTo);
if (attachment != null) {
attachment.removeAttachment(this.objectId, game);