james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1509308 - /james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractMessageMapper.java
Date Thu, 01 Aug 2013 15:48:11 GMT
Author: eric
Date: Thu Aug  1 15:48:11 2013
New Revision: 1509308

URL: http://svn.apache.org/r1509308
Log:
ModSeq is set to -1 on all messages when updating flags, patch contributed by          Jan-Philipp
Niewerth (MAILBOX-197)

Modified:
    james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractMessageMapper.java

Modified: james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractMessageMapper.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractMessageMapper.java?rev=1509308&r1=1509307&r2=1509308&view=diff
==============================================================================
--- james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractMessageMapper.java
(original)
+++ james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractMessageMapper.java
Thu Aug  1 15:48:11 2013
@@ -34,13 +34,12 @@ import org.apache.james.mailbox.store.ma
 import org.apache.james.mailbox.store.transaction.TransactionalMapper;
 
 /**
- * Abstract base class for {@link MessageMapper} implementation which already takes care
of most uid / mod-seq handling
- * 
+ * Abstract base class for {@link MessageMapper} implementation
+ * which already takes care of most uid / mod-seq handling.
  *
  * @param <Id>
  */
 public abstract class AbstractMessageMapper<Id> extends TransactionalMapper implements
MessageMapper<Id>{
-   
     protected final MailboxSession mailboxSession;
     private final UidProvider<Id> uidProvider;
     private final ModSeqProvider<Id> modSeqProvider;
@@ -51,7 +50,6 @@ public abstract class AbstractMessageMap
         this.modSeqProvider = modSeqProvider;
     }
     
-    
     /**
      * @see org.apache.james.mailbox.store.mail.MessageMapper#getHighestModSeq(org.apache.james.mailbox.store.mail.model.Mailbox)
      */
@@ -66,9 +64,6 @@ public abstract class AbstractMessageMap
         return uidProvider.lastUid(mailboxSession, mailbox);
     }
     
-
-
-    
     /**
      * @see org.apache.james.mailbox.store.mail.MessageMapper#updateFlags(org.apache.james.mailbox.store.mail.model.Mailbox,
javax.mail.Flags, boolean, boolean, org.apache.james.mailbox.model.MessageRange)
      */
@@ -77,7 +72,7 @@ public abstract class AbstractMessageMap
         Iterator<Message<Id>> messages = findInMailbox(mailbox, set, FetchType.Metadata,
-1);
         
         long modSeq = -1;
-        if (messages.hasNext() == false) {
+        if (messages.hasNext()) {
             // if a mailbox does not support mod-sequences the provider may be null
             if (modSeqProvider != null) {
                 modSeq = modSeqProvider.nextModSeq(mailboxSession, mailbox);



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