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: [email protected]
For additional commands, e-mail: [email protected]