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

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

commit 1a70be10206c330f953acdd3f4aafa2148cdc84b
Author: RĂ©mi Kowalski <[email protected]>
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 d7f0197..0f55716 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to