woj-tek commented on code in PR #2386:
URL: https://github.com/apache/james-project/pull/2386#discussion_r1726705276
##########
server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/ChannelImapResponseWriter.java:
##########
@@ -68,6 +83,15 @@ public void setFlushCallback(FlushCallback flushCallback) {
@Override
public void write(byte[] buffer) {
+ if (LOGGER.isTraceEnabled()) {
+ if (ctx != null) {
+ ImapSession imapSession =
ctx.channel().attr(IMAP_SESSION_ATTRIBUTE_KEY).get();
+ String username = retrieveUsername(imapSession);
Review Comment:
> I'm sorry I am definitly picky
Please, do be! :)
> I would add the ImapSession as a field, then pass it as an argument and
avoid resolve it here.
Changed the code but I think, to make it better it would be good to
deprecate (and make private) other constructors
(`org.apache.james.imapserver.netty.ChannelImapResponseWriter#ChannelImapResponseWriter(io.netty.channel.Channel)`
and
`org.apache.james.imapserver.netty.ChannelImapResponseWriter#ChannelImapResponseWriter(io.netty.channel.Channel,
boolean)`)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]