james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rouaz...@apache.org
Subject [james-project] 04/06: JAMES-2761 remove dead code in AbstractSelectionProcessor.respond
Date Wed, 12 Jun 2019 14:32:15 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 033ab85cd25d72ffc774daec3df8e90887ea5a6e
Author: RĂ©mi Kowalski <rkowalski@linagora.com>
AuthorDate: Tue May 14 10:09:51 2019 +0200

    JAMES-2761 remove dead code in AbstractSelectionProcessor.respond
---
 .../imap/processor/AbstractSelectionProcessor.java     | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
index 3abf4e7..5a3e09f 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
@@ -53,7 +53,6 @@ import org.apache.james.mailbox.exception.MailboxNotFoundException;
 import org.apache.james.mailbox.exception.MessageRangeException;
 import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.model.MessageRange;
-import org.apache.james.mailbox.model.SearchQuery;
 import org.apache.james.metrics.api.MetricFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -115,9 +114,7 @@ abstract class AbstractSelectionProcessor<M extends AbstractMailboxSelectionRequ
             taggedBad(command, tag, responder, HumanReadableText.QRESYNC_NOT_ENABLED);
             return;
         }
-        
-        
-        
+
         final MessageManager.MetaData metaData = selectMailbox(fullMailboxPath, session);
         final SelectedMailbox selected = session.getSelected();
         MessageUid firstUnseen = metaData.getFirstUnseen();
@@ -161,17 +158,14 @@ abstract class AbstractSelectionProcessor<M extends AbstractMailboxSelectionRequ
                 final MailboxManager mailboxManager = getMailboxManager();
                 final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
                 final MessageManager mailbox = mailboxManager.getMailbox(fullMailboxPath,
mailboxSession);
-               
-                
+
                 //  If the provided UIDVALIDITY matches that of the selected mailbox, the
                 //  server then checks the last known modification sequence.
                 //
                 //  The server sends the client any pending flag changes (using FETCH
                 //  responses that MUST contain UIDs) and expunges those that have
                 //  occurred in this mailbox since the provided modification sequence.
-                SearchQuery sq = new SearchQuery();
-                sq.andCriteria(SearchQuery.modSeqGreaterThan(request.getKnownModSeq()));
-                
+
                 UidRange[] uidSet = request.getUidSet();
 
                 if (uidSet == null) {
@@ -219,8 +213,6 @@ abstract class AbstractSelectionProcessor<M extends AbstractMailboxSelectionRequ
                                 knownUidsList.add(uid);
                             }
                         }
-                       
-                        
                         
                         // loop over the known sequences and check the UID for MSN X again
the known UID X 
                         MessageUid firstUid = MessageUid.MIN_VALUE;
@@ -248,7 +240,6 @@ abstract class AbstractSelectionProcessor<M extends AbstractMailboxSelectionRequ
                                     done = true;
                                     break;
                                 }
-
                             }
 
                             // We found the first uid to start with 
@@ -272,7 +263,6 @@ abstract class AbstractSelectionProcessor<M extends AbstractMailboxSelectionRequ
                             }
                         }
                         
-                        
                     }
                     
                     List<MessageRange> ranges = new ArrayList<>();
@@ -284,8 +274,6 @@ abstract class AbstractSelectionProcessor<M extends AbstractMailboxSelectionRequ
                         }
                     }
                     
-                    
-                    
                     // TODO: Reconsider if we can do something to make the handling better.
Maybe at least cache the triplets for the expunged
                     //       while have the server running. This could maybe allow us to
not return every expunged message all the time
                     //  


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


Mime
View raw message