Author: norman
Date: Fri Apr 29 05:51:56 2011
New Revision: 1097693
URL: http://svn.apache.org/viewvc?rev=1097693&view=rev
Log:
Allow to support User Flags. See MAILBOX-63
Modified:
james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
Modified:
james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
URL:
http://svn.apache.org/viewvc/james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java?rev=1097693&r1=1097692&r2=1097693&view=diff
==============================================================================
---
james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
(original)
+++
james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
Fri Apr 29 05:51:56 2011
@@ -421,7 +421,9 @@ public abstract class StoreMessageManage
/**
* Check if the given {@link Flags} contains {@link Flags} which are not
included in the returned {@link Flags} of {@link
#getPermanentFlags(MailboxSession)}.
- * If any are found, these are removed from the given {@link Flags}
instance
+ * If any are found, these are removed from the given {@link Flags}
instance. The only exception is the {@link Flag#RECENT} flag.
+ *
+ * This flag is never removed!
*
* @param flags
* @param session
@@ -433,7 +435,8 @@ public abstract class StoreMessageManage
Flag[] systemFlags = flags.getSystemFlags();
for (int i = 0; i < systemFlags.length; i++) {
Flag f = systemFlags[i];
- if (permFlags.contains(f) == false) {
+
+ if (f != Flag.RECENT && permFlags.contains(f) == false) {
flags.remove(f);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]