Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-25 Thread via GitHub
chenggwang commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1780424297 > Thanks for the PR. Thanks for all the REVIEWS! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-25 Thread via GitHub
aooohan commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1780324734 Thanks for the PR. -- 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

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-25 Thread via GitHub
aooohan merged PR #671: URL: https://github.com/apache/tomcat/pull/671 -- 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:

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-14 Thread via GitHub
chenggwang commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1763278643 > If we are going to do anything for this > > > Just simple `... + ":" + sc;` is enough > > works for me if applied to both NIO and NIO2 rather than just NIO

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-14 Thread via GitHub
markt-asf commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1763192873 If we are going to do anything for this > Just simple `... + ":" + sc;` is enough works for me if applied to both NIO and NIO2 rather than just NIO. -- This is an automated

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-14 Thread via GitHub
chenggwang commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1763157260 This is a bug that tomcat itself just doesn't realize. Because it doesn't need to call toString immediately after the `NioChannel` object is created.However, for third-party software

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-14 Thread via GitHub
chenggwang commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1763120686 > I do not like the use of "?:" operator here. Just simple `... + ":" + sc;` is enough, or if you want to be explicit `+ ":" + String.valueOf(sc);` If we don't consider the

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-14 Thread via GitHub
kkolinko commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1763032642 I do not like the use of "?:" operator here. Just simple `... + ":" + sc;` is enough, or if you want to be explicit `+ ":" + String.valueOf(sc);` -- This is an automated message from

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-14 Thread via GitHub
chenggwang commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1762757733 @rmaucher @markt-asf @michael-o Such a change in tomcat functionality does not help, but after the initialization of the NioChannel object should provide a reliable, stable function, can

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-14 Thread via GitHub
chenggwang commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1762749332 > The benefit seems null IMO, in the debugger it will print out that this is null instead of a NPE, which should mean the same for a developer. Also, Nio2Channel.toString is the same.

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-13 Thread via GitHub
michael-o commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1761094466 > The benefit seems null IMO, in the debugger it will print out that this is null instead of a NPE, which should mean the same for a developer. Also, Nio2Channel.toString is the same.

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-13 Thread via GitHub
rmaucher commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1761084688 The benefit seems null IMO, in the debugger it will print out that this is null instead of a NPE, which should mean the same for a developer. Also, Nio2Channel.toString is the same. --

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-13 Thread via GitHub
michael-o commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1761073554 @markt-asf Are we good to merge this one? -- 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

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-11 Thread via GitHub
CharliesAngel1 commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1756870192 oook -- 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

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-10 Thread via GitHub
chenggwang commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1756826381 Can someone please review this? -- 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

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-10 Thread via GitHub
chenggwang commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1755896980 ```java protected boolean setSocketOptions(SocketChannel socket) { NioSocketWrapper socketWrapper = null; try { // Allocate channel and wrapper

Re: [PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-10 Thread via GitHub
chenggwang commented on PR #671: URL: https://github.com/apache/tomcat/pull/671#issuecomment-1755822815 `protected boolean setSocketOptions(SocketChannel socket) { NioSocketWrapper socketWrapper = null; try { // Allocate channel and wrapper

[PR] Fix NioChannel's toString() throwing NullPointerException in some cases [tomcat]

2023-10-10 Thread via GitHub
chenggwang opened a new pull request, #671: URL: https://github.com/apache/tomcat/pull/671 NioChannel's toString() causes NioEndpoint's setSocketOptions method to throw a NullPointerException in some scenarios (e.g. idea breakpoint debugging). -- This is an automated message from the