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 2024/12/16 20:08:01 UTC
(james-project) branch log-imap-store created (now 1122d40019)
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a change to branch log-imap-store
in repository https://gitbox.apache.org/repos/asf/james-project.git
at 1122d40019 [ENHANCEMENT] Improve log line for IMAP store
This branch includes the following new commits:
new 1122d40019 [ENHANCEMENT] Improve log line for IMAP store
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
(james-project) 01/01: [ENHANCEMENT] Improve log line for IMAP store
Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch log-imap-store
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 1122d4001904903aac9c77eff2765b8d9276bd10
Author: Benoit TELLIER <bt...@linagora.com>
AuthorDate: Mon Dec 16 21:07:23 2024 +0100
[ENHANCEMENT] Improve log line for IMAP store
---
.../java/org/apache/james/imap/message/request/StoreRequest.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/message/request/StoreRequest.java b/protocols/imap/src/main/java/org/apache/james/imap/message/request/StoreRequest.java
index e1d486c068..a09f0b2b94 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/message/request/StoreRequest.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/message/request/StoreRequest.java
@@ -18,12 +18,15 @@
****************************************************************/
package org.apache.james.imap.message.request;
+import java.util.stream.Collectors;
+
import jakarta.mail.Flags;
import org.apache.james.imap.api.ImapConstants;
import org.apache.james.imap.api.Tag;
import org.apache.james.imap.api.message.IdRange;
import org.apache.james.mailbox.MessageManager;
+import org.apache.james.util.StreamUtils;
public class StoreRequest extends AbstractImapRequest {
private final IdRange[] idSet;
@@ -74,10 +77,11 @@ public class StoreRequest extends AbstractImapRequest {
public String toString() {
final StringBuilder builder = new StringBuilder(100);
- builder.append("STORE ");
if (isUseUids()) {
builder.append("UID ");
}
+ builder.append("STORE ");
+ StreamUtils.ofNullable(idSet).map(range -> " " + range.asString()).forEach(builder::append);
if (isSilent()) {
builder.append("SILENT ");
}
@@ -105,6 +109,7 @@ public class StoreRequest extends AbstractImapRequest {
if (flags.contains(Flags.Flag.RECENT)) {
builder.append(" RECENT");
}
+ StreamUtils.ofNullable(flags.getUserFlags()).map(flag -> flag + " ").forEach(builder::append);
return builder.toString();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org