chenggwang commented on PR #671:

   `protected boolean setSocketOptions(SocketChannel socket) {
           NioSocketWrapper socketWrapper = null;
           try {
               // Allocate channel and wrapper
               NioChannel channel = null;
               if (nioChannels != null) {
                   channel = nioChannels.pop();
               if (channel == null) {
                   SocketBufferHandler bufhandler = new SocketBufferHandler(
                   channel = createChannel(bufhandler);
               NioSocketWrapper newWrapper = new NioSocketWrapper(channel, 
               channel.reset(socket, newWrapper);
               connections.put(socket, newWrapper);
               socketWrapper = newWrapper;`
   Because it is not until `channel.reset(socket, newWrapper); `is executed. sc 
and socketWrapper will not be assigned values. But if toString() is called 
before (e.g., channel, socketWrapper in IDEA breakpoint debugging), a null 
pointer exception is thrown.
   <img width="824" alt="bug 2023-10-10 231457" 

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:

For queries about this service, please contact Infrastructure at:

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to