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 no...@apache.org on 2011/04/11 15:34:57 UTC

svn commit: r1091069 - /james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/MailboxEventAnalyser.java

Author: norman
Date: Mon Apr 11 13:34:56 2011
New Revision: 1091069

URL: http://svn.apache.org/viewvc?rev=1091069&view=rev
Log:
COPY command should set RECENT flag on messages after copy them. See IMAP-287

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

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/MailboxEventAnalyser.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/MailboxEventAnalyser.java?rev=1091069&r1=1091068&r2=1091069&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/MailboxEventAnalyser.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/MailboxEventAnalyser.java Mon Apr 11 13:34:56 2011
@@ -105,13 +105,19 @@ public class MailboxEventAnalyser extend
                         }
                     }
                     SelectedMailbox sm = session.getSelected();
-                    // We need to add the UID of the message to the recent list if we receive an flag update which contains a \RECENT flag 
-                    // See IMAP-287
-                    Iterator<Flag> flags = updated.flagsIterator();
-                    while(flags.hasNext()) {
-                        if (Flag.RECENT.equals(flags.next())) {
-                            if (sm.getPath().equals(event.getMailboxPath())) {
-                                sm.addRecent(updated.getSubjectUid());
+                    if (sm != null) {
+                        // We need to add the UID of the message to the recent
+                        // list if we receive an flag update which contains a
+                        // \RECENT flag
+                        // See IMAP-287
+                        Iterator<Flag> flags = updated.flagsIterator();
+
+                        while (flags.hasNext()) {
+                            if (Flag.RECENT.equals(flags.next())) {
+                                MailboxPath path = sm.getPath();
+                                if (path != null && path.equals(event.getMailboxPath())) {
+                                    sm.addRecent(updated.getSubjectUid());
+                                }
                             }
                         }
                     }



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