You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2020/12/29 02:50:39 UTC

[james-project] branch master updated: JAMES-3465 isAccountChange should be added in MailboxChange bean contract

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git


The following commit(s) were added to refs/heads/master by this push:
     new 850cb0f  JAMES-3465 isAccountChange should be added in MailboxChange bean contract
850cb0f is described below

commit 850cb0f4c4905da12cb5315217b0efc7c10647a7
Author: Rene Cordier <rc...@linagora.com>
AuthorDate: Tue Dec 29 09:33:12 2020 +0700

    JAMES-3465 isAccountChange should be added in MailboxChange bean contract
    
    Result of a bad merge, it was missing in the end...
---
 .../org/apache/james/jmap/api/change/MailboxChange.java     |  4 +++-
 .../org/apache/james/jmap/api/change/MailboxChangeTest.java | 13 ++++++++-----
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/server/data/data-jmap/src/main/java/org/apache/james/jmap/api/change/MailboxChange.java b/server/data/data-jmap/src/main/java/org/apache/james/jmap/api/change/MailboxChange.java
index 501a7b8..2258ba4 100644
--- a/server/data/data-jmap/src/main/java/org/apache/james/jmap/api/change/MailboxChange.java
+++ b/server/data/data-jmap/src/main/java/org/apache/james/jmap/api/change/MailboxChange.java
@@ -380,6 +380,7 @@ public class MailboxChange {
             return Objects.equals(accountId, that.accountId)
                 && Objects.equals(state, that.state)
                 && Objects.equals(date, that.date)
+                && Objects.equals(isCountChange, that.isCountChange)
                 && Objects.equals(delegated, that.delegated)
                 && Objects.equals(created, that.created)
                 && Objects.equals(updated, that.updated)
@@ -390,7 +391,7 @@ public class MailboxChange {
 
     @Override
     public final int hashCode() {
-        return Objects.hash(accountId, state, date, delegated, created, updated, destroyed);
+        return Objects.hash(accountId, state, date, isCountChange, delegated, created, updated, destroyed);
     }
 
     @Override
@@ -399,6 +400,7 @@ public class MailboxChange {
             .add("accountId", accountId)
             .add("state", state)
             .add("date", date)
+            .add("isCountChange", isCountChange)
             .add("isDelegated", delegated)
             .add("created", created)
             .add("updated", updated)
diff --git a/server/data/data-jmap/src/test/java/org/apache/james/jmap/api/change/MailboxChangeTest.java b/server/data/data-jmap/src/test/java/org/apache/james/jmap/api/change/MailboxChangeTest.java
index 06b0ed9..2c26db2 100644
--- a/server/data/data-jmap/src/test/java/org/apache/james/jmap/api/change/MailboxChangeTest.java
+++ b/server/data/data-jmap/src/test/java/org/apache/james/jmap/api/change/MailboxChangeTest.java
@@ -46,7 +46,8 @@ class MailboxChangeTest {
             MailboxChange.builder()
                 .accountId(null)
                 .state(State.of(UUID.randomUUID()))
-                .date(DATE.minusHours(2)))
+                .date(DATE.minusHours(2))
+                .isCountChange(false))
             .isInstanceOf(NullPointerException.class);
     }
 
@@ -56,8 +57,9 @@ class MailboxChangeTest {
             MailboxChange.builder()
                 .accountId(ACCOUNT_ID)
                 .state(null)
-                .date(DATE.minusHours(2)))
-            .isInstanceOf(NullPointerException.class);;
+                .date(DATE.minusHours(2))
+                .isCountChange(false))
+            .isInstanceOf(NullPointerException.class);
     }
 
     @Test
@@ -66,7 +68,8 @@ class MailboxChangeTest {
             MailboxChange.builder()
                 .accountId(ACCOUNT_ID)
                 .state(State.of(UUID.randomUUID()))
-                .date(null))
-            .isInstanceOf(NullPointerException.class);;
+                .date(null)
+                .isCountChange(false))
+            .isInstanceOf(NullPointerException.class);
     }
 }
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org