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 rc...@apache.org on 2019/11/25 09:07:05 UTC

[james-project] 22/22: [Refactoring] ModSeq are never used in MetaDataWithContent

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 248b0b7a623ee57917be1eb07bc2500a5b547162
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Thu Nov 21 19:07:31 2019 +0700

    [Refactoring] ModSeq are never used in MetaDataWithContent
---
 .../model/message/view/MessageFullViewFactory.java   | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/model/message/view/MessageFullViewFactory.java b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/model/message/view/MessageFullViewFactory.java
index d233993..430910d 100644
--- a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/model/message/view/MessageFullViewFactory.java
+++ b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/model/message/view/MessageFullViewFactory.java
@@ -37,7 +37,6 @@ import org.apache.james.jmap.draft.model.MessagePreviewGenerator;
 import org.apache.james.jmap.draft.utils.HtmlTextExtractor;
 import org.apache.james.mailbox.BlobManager;
 import org.apache.james.mailbox.MessageUid;
-import org.apache.james.mailbox.ModSeq;
 import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.Cid;
 import org.apache.james.mailbox.model.MailboxId;
@@ -183,7 +182,6 @@ public class MessageFullViewFactory implements MessageViewFactory<MessageFullVie
         public static Builder builderFromMessageResult(MessageResult messageResult) throws MailboxException {
             Builder builder = builder()
                 .uid(messageResult.getUid())
-                .modSeq(messageResult.getModSeq())
                 .size(messageResult.getSize())
                 .internalDate(messageResult.getInternalDate().toInstant())
                 .attachments(messageResult.getLoadedAttachments())
@@ -197,7 +195,6 @@ public class MessageFullViewFactory implements MessageViewFactory<MessageFullVie
         
         public static class Builder {
             private MessageUid uid;
-            private ModSeq modSeq;
             private Keywords keywords;
             private Long size;
             private Instant internalDate;
@@ -211,12 +208,7 @@ public class MessageFullViewFactory implements MessageViewFactory<MessageFullVie
                 this.uid = uid;
                 return this;
             }
-            
-            public Builder modSeq(ModSeq modSeq) {
-                this.modSeq = modSeq;
-                return this;
-            }
-            
+
             public Builder keywords(Keywords keywords) {
                 this.keywords = keywords;
                 return this;
@@ -264,7 +256,6 @@ public class MessageFullViewFactory implements MessageViewFactory<MessageFullVie
             
             public MetaDataWithContent build() {
                 Preconditions.checkArgument(uid != null);
-                Preconditions.checkArgument(modSeq != null);
                 Preconditions.checkArgument(keywords != null);
                 Preconditions.checkArgument(size != null);
                 Preconditions.checkArgument(internalDate != null);
@@ -272,12 +263,11 @@ public class MessageFullViewFactory implements MessageViewFactory<MessageFullVie
                 Preconditions.checkArgument(attachments != null);
                 Preconditions.checkArgument(mailboxIds != null);
                 Preconditions.checkArgument(messageId != null);
-                return new MetaDataWithContent(uid, modSeq, keywords, size, internalDate, content, sharedContent, attachments, mailboxIds, messageId);
+                return new MetaDataWithContent(uid, keywords, size, internalDate, content, sharedContent, attachments, mailboxIds, messageId);
             }
         }
 
         private final MessageUid uid;
-        private final ModSeq modSeq;
         private final Keywords keywords;
         private final long size;
         private final Instant internalDate;
@@ -288,7 +278,6 @@ public class MessageFullViewFactory implements MessageViewFactory<MessageFullVie
         private final MessageId messageId;
 
         private MetaDataWithContent(MessageUid uid,
-                                    ModSeq modSeq,
                                     Keywords keywords,
                                     long size,
                                     Instant internalDate,
@@ -298,7 +287,6 @@ public class MessageFullViewFactory implements MessageViewFactory<MessageFullVie
                                     Set<MailboxId> mailboxIds,
                                     MessageId messageId) {
             this.uid = uid;
-            this.modSeq = modSeq;
             this.keywords = keywords;
             this.size = size;
             this.internalDate = internalDate;
@@ -313,10 +301,6 @@ public class MessageFullViewFactory implements MessageViewFactory<MessageFullVie
             return uid;
         }
 
-        public ModSeq getModSeq() {
-            return modSeq;
-        }
-
         public Keywords getKeywords() {
             return keywords;
         }


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