This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/master by this push:
new 4cbe4680aa [ENHANCEMENT] Improve log line for IMAP store (#2570)
4cbe4680aa is described below
commit 4cbe4680aa2d71157783a6a45646b277cddf5de1
Author: Benoit TELLIER <[email protected]>
AuthorDate: Wed Dec 18 04:50:14 2024 +0100
[ENHANCEMENT] Improve log line for IMAP store (#2570)
---
.../java/org/apache/james/imap/message/request/StoreRequest.java | 5 ++++-
1 file changed, 4 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..b943cd150d 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
@@ -24,6 +24,7 @@ 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 +75,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 +107,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: [email protected]
For additional commands, e-mail: [email protected]