You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "davide.bz (JIRA)" <se...@james.apache.org> on 2006/09/21 11:13:23 UTC

[jira] Commented: (JAMES-624) Order of message does not follow receiving order

    [ http://issues.apache.org/jira/browse/JAMES-624?page=comments#action_12436476 ] 
            
davide.bz commented on JAMES-624:
---------------------------------

On MBoxMailRepository.java I have solved myself. At the end of method list()

replace 

        return mList.keySet().iterator();

with

        // 2006-09-21 d@vide.bz: sort list by mbox position

        ArrayList mListSorted = new ArrayList(mList.keySet());
        Collections.sort(mListSorted, new Comparator()
        {
            public int compare(Object o1, Object o2)
            {
                Long n1 = (Long)mList.get(o1);
                Long n2 = (Long)mList.get(o2);
                return n1.compareTo(n2);
            }    
        });
        
        //return mList.keySet().iterator();

        return mListSorted.iterator();
        
        // 2006-09-21 d@vide.bz: end sort list

----------------

Please copy&paste in our code (leaving my comment please as credits)


> Order of message does not follow receiving order
> ------------------------------------------------
>
>                 Key: JAMES-624
>                 URL: http://issues.apache.org/jira/browse/JAMES-624
>             Project: James
>          Issue Type: Improvement
>          Components: POP3Server
>         Environment: linux, jdk1.5
>            Reporter: davide.bz
>            Priority: Minor
>
> I have noted that unlike other pop server, james pop will not list messages so that they comes. So the first message can be not really the first comed and so on without any apparently logic.
> I should alway use date for sorting message

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org