james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norman Maurer (JIRA)" <server-...@james.apache.org>
Subject [jira] Resolved: (JAMES-641) POP3 list return messages in order as they comes with file pair
Date Fri, 06 Oct 2006 06:49:23 GMT
     [ http://issues.apache.org/jira/browse/JAMES-641?page=all ]

Norman Maurer resolved JAMES-641.
---------------------------------

    Fix Version/s: Trunk
       Resolution: Fixed

> POP3 list return messages in order as they comes with file pair
> ---------------------------------------------------------------
>
>                 Key: JAMES-641
>                 URL: http://issues.apache.org/jira/browse/JAMES-641
>             Project: James
>          Issue Type: Improvement
>          Components: James Core
>    Affects Versions: 2.2.0
>         Environment: linux, jdk1.5
>            Reporter: davide.bz
>         Assigned To: Norman Maurer
>             Fix For: Trunk
>
>
> I like to have the list method to return message so that the progressive number correpond
to the receiving order (so all new messaged are on top/bottom).
> With mbox I have already send a patch. But I have noted that mbox does not
> work good with large attachment. So I go back to file pair (default mailrepository)
> But this is not ordered too!!
> I have noted that filenames is an encoded verion of the id of the mail! but the progressive
number in id is not rpad so the string file name does not correspond with progressive number.
> I haved maded by me a path. I does not have testet it in deep but I will send.
> The patched method is the James.java:
> -------------------------------------------------------------------------
>     /**
>      * Return a new mail id.
>      *
>      * @return a new mail id
>      */
>     public String getId() {
>         long localCount = -1;
>         synchronized (James.class) {
>             localCount = count++;
>         }
>         // 2006-09-28 d@vide.bz: rpad progressive will make file name order 
>         // like receiving order!
>         String localCountStr = String.valueOf(localCount);
>         localCountStr = "00000000000000000000" + localCountStr;
>         localCountStr = localCountStr.substring(localCountStr.length() - 20);
>         StringBuffer idBuffer =
>             new StringBuffer(64)
>                     .append("Mail")
>                     .append(System.currentTimeMillis())
>                     .append("-")
>                     .append(localCountStr);
>         return idBuffer.toString();
>     }

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


Mime
View raw message