james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1147755 - /james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
Date Mon, 18 Jul 2011 06:30:59 GMT
Author: norman
Date: Mon Jul 18 06:30:59 2011
New Revision: 1147755

URL: http://svn.apache.org/viewvc?rev=1147755&view=rev
Log:
Fix NPE. Introduced while working on QRESYNC support. See IMAP-307

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

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java?rev=1147755&r1=1147754&r2=1147755&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
(original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
Mon Jul 18 06:30:59 2011
@@ -466,9 +466,14 @@ abstract class AbstractSelectionProcesso
             // See http://www.dovecot.org/list/dovecot/2008-March/029561.html
             if (capability.equalsIgnoreCase(ImapConstants.SUPPORTS_CONDSTORE)|| capability.equalsIgnoreCase(ImapConstants.SUPPORTS_QRESYNC))
{
                 try {
+                    MetaData metaData  = null;
+                    boolean send = false;
+                    if (sm != null) {
                     MessageManager mailbox = getSelectedMailbox(session);
-                    MetaData metaData = mailbox.getMetaData(false, ImapSessionUtils.getMailboxSession(session),
FetchGroup.NO_COUNT);
-                    condstoreEnablingCommand(session, responder, metaData, sm != null);
+                    metaData = mailbox.getMetaData(false, ImapSessionUtils.getMailboxSession(session),
FetchGroup.NO_COUNT);
+                    send= true;
+                    }
+                    condstoreEnablingCommand(session, responder, metaData, send);
                 } catch (MailboxException e) {
                     throw new EnableException("Unable to enable " + capability, 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