You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by rc...@apache.org on 2021/01/05 04:55:58 UTC

[james-project] 19/24: [REFACTORING] Steps of the staged builder should be inside the Builder of MailboxChange

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

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

commit 4b3785dea7283c988206de6303d19bb0c6da7dbc
Author: Rene Cordier <rc...@linagora.com>
AuthorDate: Thu Dec 31 10:54:26 2020 +0700

    [REFACTORING] Steps of the staged builder should be inside the Builder of MailboxChange
    
    That's the pattern we use generally in the code... And my IDE was screaming at it for some reasons
---
 .../james/jmap/api/change/MailboxChange.java       | 36 +++++++++++-----------
 1 file changed, 18 insertions(+), 18 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 d4ea806..3d8533d 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
@@ -51,27 +51,27 @@ import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
 
 public class MailboxChange {
-    @FunctionalInterface
-    public interface RequiredAccountId {
-        RequiredState accountId(AccountId accountId);
-    }
+    public static class Builder {
+        @FunctionalInterface
+        public interface RequiredAccountId {
+            RequiredState accountId(AccountId accountId);
+        }
 
-    @FunctionalInterface
-    public interface RequiredState {
-        RequiredDate state(State state);
-    }
+        @FunctionalInterface
+        public interface RequiredState {
+            RequiredDate state(State state);
+        }
 
-    @FunctionalInterface
-    public interface RequiredDate {
-        RequiredIsCountChange date(ZonedDateTime date);
-    }
+        @FunctionalInterface
+        public interface RequiredDate {
+            RequiredIsCountChange date(ZonedDateTime date);
+        }
 
-    @FunctionalInterface
-    public interface RequiredIsCountChange {
-        Builder isCountChange(boolean isCountChange);
-    }
+        @FunctionalInterface
+        public interface RequiredIsCountChange {
+            Builder isCountChange(boolean isCountChange);
+        }
 
-    public static class Builder {
         private final AccountId accountId;
         private final State state;
         private final ZonedDateTime date;
@@ -124,7 +124,7 @@ public class MailboxChange {
         }
     }
 
-    public static RequiredAccountId builder() {
+    public static Builder.RequiredAccountId builder() {
         return accountId -> state -> date -> isCountChange -> new Builder(accountId, state, date, isCountChange);
     }
 


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