Hi,
I was working on MAILBOX-146
<https://issues.apache.org/jira/browse/MAILBOX-146> to add a batch size
where needed in the StoreMessageManager ( setFlags,
deleteMarkedInMailbox, recent, copy, move ) and I add a look at the code
of the StoreMailboxManager.
I found a call to a method named *copyTo* in an other method named
*moveMessages*...
I might have missed something, but I think this might create a bug when
moveBatchSize is not null....
You will find as an attachment a patch solving this problem by replacing
the call to copyTo by moveTo in moveMessages.
Sincerly yours,
Benoit Tellier
diff -uNr james-mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java james-mailbox-new/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
--- james-mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java 2014-12-16 17:49:36.516595489 +0100
+++ james-mailbox-new/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java 2014-12-18 15:47:11.388596533 +0100
@@ -480,7 +480,7 @@
List<MessageRange> movedRanges = new ArrayList<MessageRange>();
Iterator<MessageRange> ranges = set.split(moveBatchSize).iterator();
while (ranges.hasNext()) {
- movedRanges.addAll(fromMailbox.copyTo(ranges.next(), toMailbox, session));
+ movedRanges.addAll(fromMailbox.moveTo(ranges.next(), toMailbox, session));
}
return movedRanges;
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]