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 752b2c01b5f51e2c08f8d9b0509b94423580c4a7 Author: Benoit TELLIER <btell...@linagora.com> AuthorDate: Mon Feb 26 17:26:22 2024 +0100 JAMES-4007 ImapRequestFrameDecoder: use concurrentHashMap Because file buffering might access this but outside of the event loop --- .../org/apache/james/imapserver/netty/ImapRequestFrameDecoder.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/ImapRequestFrameDecoder.java b/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/ImapRequestFrameDecoder.java index e157c0e8b2..4f9fd126a8 100644 --- a/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/ImapRequestFrameDecoder.java +++ b/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/ImapRequestFrameDecoder.java @@ -27,10 +27,10 @@ import java.io.IOException; import java.io.OutputStream; import java.nio.file.Files; import java.util.Deque; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedDeque; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; @@ -59,7 +59,6 @@ import reactor.core.publisher.Mono; import reactor.core.publisher.Sinks; import reactor.core.scheduler.Schedulers; - /** * {@link ByteToMessageDecoder} which will decode via and {@link ImapDecoder} instance */ @@ -86,7 +85,7 @@ public class ImapRequestFrameDecoder extends ByteToMessageDecoder implements Net @Override public void channelActive(ChannelHandlerContext ctx) throws Exception { - ctx.channel().attr(FRAME_DECODE_ATTACHMENT_ATTRIBUTE_KEY).set(new HashMap<>()); + ctx.channel().attr(FRAME_DECODE_ATTACHMENT_ATTRIBUTE_KEY).set(new ConcurrentHashMap<>()); super.channelActive(ctx); } --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org