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 ma...@apache.org on 2016/01/25 16:22:26 UTC

svn commit: r1726642 - /james/project/trunk/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMailboxesMethod.java

Author: matthieu
Date: Mon Jan 25 15:22:25 2016
New Revision: 1726642

URL: http://svn.apache.org/viewvc?rev=1726642&view=rev
Log:
JAMES-1661 Force getMailboxesMethod to respect sortOrder

        Contributed by Raphaƫl Ouazana

Modified:
    james/project/trunk/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMailboxesMethod.java

Modified: james/project/trunk/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMailboxesMethod.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMailboxesMethod.java?rev=1726642&r1=1726641&r2=1726642&view=diff
==============================================================================
--- james/project/trunk/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMailboxesMethod.java (original)
+++ james/project/trunk/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMailboxesMethod.java Mon Jan 25 15:22:25 2016
@@ -98,6 +98,7 @@ public class GetMailboxesMethod<Id exten
                 .map(mailboxPath -> mailboxFromMailboxPath(mailboxPath, mailboxSession))
                 .filter(Optional::isPresent)
                 .map(Optional::get)
+                .sorted((m1, m2) -> Integer.compare(m1.getSortOrder(), m2.getSortOrder()))
                 .forEach(mailbox -> builder.add(mailbox));
             return builder.build();
         } catch (MailboxException e) {



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