You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2017/08/18 02:48:16 UTC
[8/8] james-project git commit: JAMES-2107 MailboxAnnotationKey
equality should be commutative but is not
JAMES-2107 MailboxAnnotationKey equality should be commutative but is not
Assertj changed internally and revealed a commutative issue
that needs to be fixed in MailboxAnnotationKey
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/88f43f1b
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/88f43f1b
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/88f43f1b
Branch: refs/heads/master
Commit: 88f43f1b94ce211c5363be816a781fa622802181
Parents: e71db87
Author: Matthieu Baechler <ma...@apache.org>
Authored: Wed Aug 16 18:34:50 2017 +0200
Committer: benwa <bt...@linagora.com>
Committed: Fri Aug 18 09:47:51 2017 +0700
----------------------------------------------------------------------
.../org/apache/james/mailbox/model/MailboxAnnotationKey.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/88f43f1b/mailbox/api/src/main/java/org/apache/james/mailbox/model/MailboxAnnotationKey.java
----------------------------------------------------------------------
diff --git a/mailbox/api/src/main/java/org/apache/james/mailbox/model/MailboxAnnotationKey.java b/mailbox/api/src/main/java/org/apache/james/mailbox/model/MailboxAnnotationKey.java
index b251765..f5932d9 100644
--- a/mailbox/api/src/main/java/org/apache/james/mailbox/model/MailboxAnnotationKey.java
+++ b/mailbox/api/src/main/java/org/apache/james/mailbox/model/MailboxAnnotationKey.java
@@ -109,7 +109,7 @@ public class MailboxAnnotationKey {
public boolean equals(Object obj) {
if (obj instanceof MailboxAnnotationKey) {
MailboxAnnotationKey anotherKey = (MailboxAnnotationKey)obj;
- return Objects.equal(anotherKey.asString(), key);
+ return Objects.equal(anotherKey.asString(), asString());
} else {
return false;
}
@@ -117,6 +117,6 @@ public class MailboxAnnotationKey {
@Override
public int hashCode() {
- return Objects.hashCode(key);
+ return Objects.hashCode(asString());
}
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org