From fe1e43ad27203ed037f459f0fc453aed6eaf4cec Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 4 Aug 2018 19:54:33 +0000 Subject: [PATCH] Fixed equals --- .../java/eu/faircode/email/EntityAccount.java | 2 +- .../java/eu/faircode/email/EntityFolder.java | 2 +- .../eu/faircode/email/EntityIdentity.java | 2 +- .../java/eu/faircode/email/EntityMessage.java | 32 +++++++++---------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/EntityAccount.java b/app/src/main/java/eu/faircode/email/EntityAccount.java index 6ee412a4..0b5adb7d 100644 --- a/app/src/main/java/eu/faircode/email/EntityAccount.java +++ b/app/src/main/java/eu/faircode/email/EntityAccount.java @@ -51,7 +51,7 @@ public class EntityAccount { public boolean equals(Object obj) { if (obj instanceof EntityAccount) { EntityAccount other = (EntityAccount) obj; - return (this.name == null ? other.name == null : this.name.equals(other.name) && + return ((this.name == null ? other.name == null : this.name.equals(other.name)) && this.host.equals(other.host) && this.port.equals(other.port) && this.user.equals(other.user) && diff --git a/app/src/main/java/eu/faircode/email/EntityFolder.java b/app/src/main/java/eu/faircode/email/EntityFolder.java index 587d3c45..785b8a26 100644 --- a/app/src/main/java/eu/faircode/email/EntityFolder.java +++ b/app/src/main/java/eu/faircode/email/EntityFolder.java @@ -93,7 +93,7 @@ public class EntityFolder { public boolean equals(Object obj) { if (obj instanceof EntityFolder) { EntityFolder other = (EntityFolder) obj; - return (this.account == null ? other.account == null : this.account.equals(other.account) && + return ((this.account == null ? other.account == null : this.account.equals(other.account)) && this.name.equals(other.name) && this.type.equals(other.type) && this.synchronize.equals(other.synchronize) && diff --git a/app/src/main/java/eu/faircode/email/EntityIdentity.java b/app/src/main/java/eu/faircode/email/EntityIdentity.java index 6c96207b..09682052 100644 --- a/app/src/main/java/eu/faircode/email/EntityIdentity.java +++ b/app/src/main/java/eu/faircode/email/EntityIdentity.java @@ -59,7 +59,7 @@ public class EntityIdentity { EntityIdentity other = (EntityIdentity) obj; return (this.name.equals(other.name) && this.email.equals(other.email) && - this.replyto == null ? other.replyto == null : this.replyto.equals(other.replyto) && + (this.replyto == null ? other.replyto == null : this.replyto.equals(other.replyto)) && this.host.equals(other.host) && this.port.equals(other.port) && this.starttls.equals(other.starttls) && diff --git a/app/src/main/java/eu/faircode/email/EntityMessage.java b/app/src/main/java/eu/faircode/email/EntityMessage.java index 1ec701f6..a3677f3f 100644 --- a/app/src/main/java/eu/faircode/email/EntityMessage.java +++ b/app/src/main/java/eu/faircode/email/EntityMessage.java @@ -84,23 +84,23 @@ public class EntityMessage { public boolean equals(Object obj) { if (obj instanceof EntityMessage) { EntityMessage other = (EntityMessage) obj; - return (this.account == null ? other.account == null : this.account.equals(other.account) && + return ((this.account == null ? other.account == null : this.account.equals(other.account)) && this.folder.equals(other.folder) && - this.identity == null ? other.identity == null : this.identity.equals(other.identity) && - this.replying == null ? other.replying == null : this.replying.equals(other.replying) && - this.uid == null ? other.uid == null : this.uid.equals(other.uid) && - this.msgid == null ? other.msgid == null : this.msgid.equals(other.msgid) && - this.references == null ? other.references == null : this.references.equals(other.references) && - this.inreplyto == null ? other.inreplyto == null : this.inreplyto.equals(other.inreplyto) && - this.thread == null ? other.thread == null : thread.equals(other.thread) && - this.from == null ? other.from == null : this.from.equals(other.from) && - this.to == null ? other.to == null : this.to.equals(other.to) && - this.cc == null ? other.cc == null : this.cc.equals(other.cc) && - this.bcc == null ? other.bcc == null : this.bcc.equals(other.bcc) && - this.reply == null ? other.reply == null : this.reply.equals(other.reply) && - this.subject == null ? other.subject == null : this.subject.equals(other.subject) && - this.body == null ? other.body == null : this.body.equals(other.body) && - this.sent == null ? other.sent == null : this.sent.equals(other.sent) && + (this.identity == null ? other.identity == null : this.identity.equals(other.identity)) && + (this.replying == null ? other.replying == null : this.replying.equals(other.replying)) && + (this.uid == null ? other.uid == null : this.uid.equals(other.uid)) && + (this.msgid == null ? other.msgid == null : this.msgid.equals(other.msgid)) && + (this.references == null ? other.references == null : this.references.equals(other.references)) && + (this.inreplyto == null ? other.inreplyto == null : this.inreplyto.equals(other.inreplyto)) && + (this.thread == null ? other.thread == null : thread.equals(other.thread)) && + (this.from == null ? other.from == null : this.from.equals(other.from)) && + (this.to == null ? other.to == null : this.to.equals(other.to)) && + (this.cc == null ? other.cc == null : this.cc.equals(other.cc)) && + (this.bcc == null ? other.bcc == null : this.bcc.equals(other.bcc)) && + (this.reply == null ? other.reply == null : this.reply.equals(other.reply)) && + (this.subject == null ? other.subject == null : this.subject.equals(other.subject)) && + (this.body == null ? other.body == null : this.body.equals(other.body)) && + (this.sent == null ? other.sent == null : this.sent.equals(other.sent)) && this.received.equals(other.received) && this.seen.equals(other.seen) && this.ui_seen.equals(other.ui_seen) &&