You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2022/03/22 02:03:54 UTC

[james-project] 25/25: JAMES-3722 Apply some review comments

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit b2260d9ab8cee87fce03ce798dc60fa019132da3
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon Mar 21 14:39:08 2022 +0700

    JAMES-3722 Apply some review comments
---
 .../org/apache/james/imap/processor/AbstractSelectionProcessor.java   | 1 -
 .../test/java/org/apache/james/imapserver/netty/IMAPServerTest.java   | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java b/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
index ed6293f..6646efc 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
@@ -290,7 +290,6 @@ abstract class AbstractSelectionProcessor<R extends AbstractMailboxSelectionRequ
     private UidRange[] filter(UidRange[] uidSet, MessageUid lowerBound) {
         return Arrays.stream(uidSet)
             .flatMap(range -> filter(range, lowerBound))
-            .collect(ImmutableList.toImmutableList())
             .toArray(UidRange[]::new);
     }
 
diff --git a/server/protocols/protocols-imap4/src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java b/server/protocols/protocols-imap4/src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java
index d1a12ef..06356b4 100644
--- a/server/protocols/protocols-imap4/src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java
+++ b/server/protocols/protocols-imap4/src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java
@@ -1844,7 +1844,7 @@ class IMAPServerTest {
         }
 
         @Test
-        void knownUidSetShouldTorelateDeletedMessages() throws Exception {
+        void knownUidSetShouldTolerateDeletedMessages() throws Exception {
             inbox.delete(ImmutableList.of(MessageUid.MIN_VALUE), mailboxSession);
 
             ModSeq highestModSeq = memoryIntegrationResources.getMailboxManager().getMailbox(MailboxPath.inbox(USER), mailboxSession)
@@ -2081,7 +2081,7 @@ class IMAPServerTest {
             ModSeq highestModSeq = memoryIntegrationResources.getMailboxManager().getMailbox(MailboxPath.inbox(USER), mailboxSession)
                 .getMetaData(false, mailboxSession, NO_COUNT)
                 .getHighestModSeq();
-            clientConnection.write(ByteBuffer.wrap(String.format("I00104 NOOP\r\n", highestModSeq.asLong()).getBytes(StandardCharsets.UTF_8)));
+            clientConnection.write(ByteBuffer.wrap("I00104 NOOP\r\n".getBytes(StandardCharsets.UTF_8)));
 
             assertThat(readStringUntil(clientConnection, s -> s.contains("I00104 OK NOOP completed.")))
                 .filteredOn(s -> s.contains("* VANISHED 14"))

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