james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1147302 - /james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
Date Fri, 15 Jul 2011 20:17:45 GMT
Author: norman
Date: Fri Jul 15 20:17:45 2011
New Revision: 1147302

URL: http://svn.apache.org/viewvc?rev=1147302&view=rev
Log:
Don't send HIGHESTMODSEQ in when send OK to the CLOSE command. This was stated in the errata
of QRESYNC. See IMAP-307

Modified:
    james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java?rev=1147302&r1=1147301&r2=1147302&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
(original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
Fri Jul 15 20:17:45 2011
@@ -19,14 +19,10 @@
 
 package org.apache.james.imap.processor;
 
-import java.util.Iterator;
-
 import org.apache.james.imap.api.ImapCommand;
-import org.apache.james.imap.api.ImapConstants;
 import org.apache.james.imap.api.ImapSessionUtils;
 import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
-import org.apache.james.imap.api.message.response.StatusResponse.ResponseCode;
 import org.apache.james.imap.api.process.ImapProcessor;
 import org.apache.james.imap.api.process.ImapSession;
 import org.apache.james.imap.message.request.CloseRequest;
@@ -35,8 +31,6 @@ import org.apache.james.mailbox.MailboxM
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.MessageManager;
 import org.apache.james.mailbox.MessageRange;
-import org.apache.james.mailbox.MessageManager.MetaData;
-import org.apache.james.mailbox.MessageManager.MetaData.FetchGroup;
 
 public class CloseProcessor extends AbstractMailboxProcessor<CloseRequest> {
 
@@ -50,18 +44,14 @@ public class CloseProcessor extends Abst
             final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
             if (mailbox.isWriteable(mailboxSession)) {
 
-                Iterator<Long> expunged = mailbox.expunge(MessageRange.all(), mailboxSession);
+                mailbox.expunge(MessageRange.all(), mailboxSession);
                 session.deselect();
-                
-                // Check if some messages was expunged and if QRESYNC was enabled. If so
we need to respond with an OK response that contain the HIGHESTMODSEQ
+
+                // Don't send HIGHESTMODSEQ when close. Like correct in the ERRATA of RFC5162
                 //
-                // See RFC5162 3.4. CLOSE Command
-                if (expunged.hasNext() && EnableProcessor.getEnabledCapabilities(session).contains(ImapConstants.SUPPORTS_QRESYNC))
{
-                    MetaData mdata = mailbox.getMetaData(false, mailboxSession, FetchGroup.NO_COUNT);
-                    okComplete(command, tag, ResponseCode.highestModSeq(mdata.getHighestModSeq()),
responder);
-                } else {
-                    okComplete(command, tag, responder);
-                }
+                // See http://www.rfc-editor.org/errata_search.php?rfc=5162
+                okComplete(command, tag, responder);
+               
             }
 
         } catch (MailboxException e) {



---------------------------------------------------------------------
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