diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/properties/AbstractProperty.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/properties/AbstractProperty.java index 15efe6096f4..796afc96748 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/properties/AbstractProperty.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/beans/properties/AbstractProperty.java @@ -7,6 +7,8 @@ package org.mage.plugins.card.dl.beans.properties; +import java.util.Objects; + import static java.lang.String.*; @@ -28,7 +30,7 @@ public abstract class AbstractProperty implements Property { if(!(obj instanceof Property)) return false; Object value = getValue(); Object other = ((Property) obj).getValue(); - return value == other || (value != null && value.equals(other)); + return Objects.equals(value, other); } @Override diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/images/CardDownloadData.java b/Mage.Client/src/main/java/org/mage/plugins/card/images/CardDownloadData.java index 5d7c6eaa32b..6755f978eae 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/images/CardDownloadData.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/images/CardDownloadData.java @@ -88,10 +88,10 @@ public class CardDownloadData { return false; } final CardDownloadData other = (CardDownloadData) obj; - if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) { + if (!Objects.equals(this.name, other.name)) { return false; } - if ((this.set == null) ? (other.set != null) : !this.set.equals(other.set)) { + if (!Objects.equals(this.set, other.set)) { return false; } if (!Objects.equals(this.collectorId, other.collectorId) && (this.collectorId == null || !this.collectorId.equals(other.collectorId))) {