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

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

commit d9559b1d9c8664601427f262185280511a031510
Author: Benoit TELLIER <[email protected]>
AuthorDate: Thu Oct 23 15:46:23 2025 +0200

    [FIX] Failing class cast in IMAPCommandThrottler
---
 .../java/org/apache/james/imapserver/netty/IMAPCommandsThrottler.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/IMAPCommandsThrottler.java
 
b/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/IMAPCommandsThrottler.java
index 53e2074f00..a36081eba7 100644
--- 
a/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/IMAPCommandsThrottler.java
+++ 
b/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/IMAPCommandsThrottler.java
@@ -111,7 +111,7 @@ public class IMAPCommandsThrottler extends 
ChannelInboundHandlerAdapter {
     }
 
     private static void throttle(ChannelHandlerContext ctx, Object msg, 
ImapRequest imapRequest, ThrottlerConfigurationEntry configurationEntry) {
-        ImapSession session = (ImapSession) 
ctx.channel().attr(IMAP_SESSION_ATTRIBUTE_KEY);
+        ImapSession session = (ImapSession) 
ctx.channel().attr(IMAP_SESSION_ATTRIBUTE_KEY).get();
 
         AtomicLong atomicLong = retrieveAssociatedCounter(imapRequest, 
session, configurationEntry);
         Duration delay = 
Duration.ofMillis(configurationEntry.delayMSFor(atomicLong.getAndIncrement()));


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to