On 20/02/2020 11:26, Martin Grigorov wrote: > > > On Thu, Feb 20, 2020 at 12:24 PM Mark Thomas <ma...@apache.org > <mailto:ma...@apache.org>> wrote: > > On 20/02/2020 08:54, Martin Grigorov wrote: > > Hi Mark, > > > > On Wed, Feb 19, 2020 at 3:09 PM Mark Thomas <ma...@apache.org > <mailto:ma...@apache.org> > > <mailto:ma...@apache.org <mailto:ma...@apache.org>>> wrote: > > > > On 19/02/2020 12:37, mgrigo...@apache.org > <mailto:mgrigo...@apache.org> > > <mailto:mgrigo...@apache.org <mailto:mgrigo...@apache.org>> wrote: > > > This is an automated email from the ASF dual-hosted git > repository. > > > > > > mgrigorov pushed a change to branch master > > > in repository https://gitbox.apache.org/repos/asf/tomcat.git. > > > > > > > > > from 81cfd2d Disable session persistence by default on > > StandardManager > > > add 9ff6b12 Check for non-null 'methods' > > > > Please revert. This check is unnecessary. methods cannot be > null here. > > > > > > > > https://github.com/apache/tomcat/blob/292b744994cf0cddf86b651dc1b1935dbe4fc83f/java/jakarta/servlet/http/HttpServlet.java#L514-L516 > > Here getAllDeclaredMethods() returns `null`. > > Maybe it should return an empty array ? > > No. Null is appropriate there. > > This method only returns null for the abstract superclass HttpServlet. > That call will always be a recursive call from line 518 just below. That > null will never get returned to the original caller. > > The original caller will always see either a merged array from lines > 521-530 or the result of line 519 both of which are guaranteed to be > non-null. > > The null check is unnecessary. Please remove it. > > > Done!
Thanks, Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org