[ https://issues.apache.org/jira/browse/MAILBOX-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13569731#comment-13569731 ]
Eric Charles commented on MAILBOX-191: -------------------------------------- Hi Peter, Sorry for this late reply... For the patch, this is what I did: eric:trunk svn st eric:trunk $ cd .. eric:james.svn eric$ patch -p0 < StoreMessageResultIterator.java (Stripping trailing CRs from patch.) patching file trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java Hunk #1 FAILED at 38. Hunk #2 FAILED at 50. Hunk #3 FAILED at 112. Hunk #4 FAILED at 146. 4 out of 4 hunks FAILED -- saving rejects to file trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java.rej eric:james.svn eric$ more trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java.rej *************** *** 38,43 **** import org.apache.james.mailbox.store.mail.model.Mailbox; import org.apache.james.mailbox.store.mail.model.Message; public class StoreMessageResultIterator<Id> implements MessageResultIterator { private Iterator<Message<Id>> next = null; --- 38,44 ---- import org.apache.james.mailbox.store.mail.model.Mailbox; import org.apache.james.mailbox.store.mail.model.Message; For the integration tests, you can checkout the code from https://svn.apache.org/repos/asf/james/mailbox-integration-tester/trunk/ Run after 'mvn test', it will run the tests for all the mailbox implementations Hope this helps & Thx in advance, Eric > more effective implementation of StoreMessageResultIterator > ----------------------------------------------------------- > > Key: MAILBOX-191 > URL: https://issues.apache.org/jira/browse/MAILBOX-191 > Project: James Mailbox > Issue Type: Improvement > Components: store > Affects Versions: 0.4, 0.5 > Reporter: Peter Kvokacka > Priority: Minor > Labels: patch > Fix For: 0.5 > > Attachments: StoreMessageResultIterator.java > > > I found problem with current implementation of StoreMessageResultIterator. I > discribed it here. > http://www.mail-archive.com/server-user@james.apache.org/msg14242.html > Briefly: > From Thunderbird I got request > 452 UID fetch 16,17:18,20:41,43:45,47,49 (UID RFC822.SIZE BODY.PEEK[]) > which is mapped to calls on MessageMapper.findInMailbox() > findInMailbox: TYPE: RANGE UID: 16:18, Full > *findInMailbox: TYPE: FROM UID: 19:-1, Full > findInMailbox: TYPE: RANGE UID: 20:41, Full > *findInMailbox: TYPE: FROM UID: 42:-1, Full > findInMailbox: TYPE: RANGE UID: 43:45, Full > *findInMailbox: TYPE: FROM UID: 46:-1, Full > findInMailbox: TYPE: ONE UID: 47:47, Full > *findInMailbox: TYPE: ONE UID: 48:48, Full > findInMailbox: TYPE: ONE UID: 49:49, Full > Those marked calls of method findInMailbox are completely unnecessary and > should be avoided. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org