You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mg...@apache.org on 2020/02/19 12:37:53 UTC

[tomcat] branch master updated (81cfd2d -> 9ff6b12)

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'

No new revisions were added by this update.

Summary of changes:
 java/jakarta/servlet/http/HttpServlet.java | 44 ++++++++++++++++--------------
 1 file changed, 23 insertions(+), 21 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [tomcat] branch master updated (81cfd2d -> 9ff6b12)

Posted by Mark Thomas <ma...@apache.org>.
On 20/02/2020 11:26, Martin Grigorov wrote:
> 
> 
> On Thu, Feb 20, 2020 at 12:24 PM Mark Thomas <markt@apache.org
> <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 <markt@apache.org
>     <ma...@apache.org>
>     > <mailto:markt@apache.org <ma...@apache.org>>> wrote:
>     >
>     >     On 19/02/2020 12:37, mgrigorov@apache.org
>     <ma...@apache.org>
>     >     <mailto:mgrigorov@apache.org <ma...@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [tomcat] branch master updated (81cfd2d -> 9ff6b12)

Posted by Martin Grigorov <mg...@apache.org>.
On Thu, Feb 20, 2020 at 12:24 PM Mark Thomas <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 <markt@apache.org
> > <ma...@apache.org>> wrote:
> >
> >     On 19/02/2020 12:37, mgrigorov@apache.org
> >     <ma...@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!


>
> Mark
>
>
> >
> >
> >
> >     Mark
> >
> >     ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> >     <ma...@tomcat.apache.org>
> >     For additional commands, e-mail: dev-help@tomcat.apache.org
> >     <ma...@tomcat.apache.org>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Re: [tomcat] branch master updated (81cfd2d -> 9ff6b12)

Posted by Mark Thomas <ma...@apache.org>.
On 20/02/2020 08:54, Martin Grigorov wrote:
> Hi Mark,
> 
> On Wed, Feb 19, 2020 at 3:09 PM Mark Thomas <markt@apache.org
> <ma...@apache.org>> wrote:
> 
>     On 19/02/2020 12:37, mgrigorov@apache.org
>     <ma...@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.

Mark


>  
> 
> 
>     Mark
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>     <ma...@tomcat.apache.org>
>     For additional commands, e-mail: dev-help@tomcat.apache.org
>     <ma...@tomcat.apache.org>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [tomcat] branch master updated (81cfd2d -> 9ff6b12)

Posted by Martin Grigorov <mg...@apache.org>.
Hi Mark,

On Wed, Feb 19, 2020 at 3:09 PM Mark Thomas <ma...@apache.org> wrote:

> On 19/02/2020 12:37, mgrigorov@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 ?


>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Re: [tomcat] branch master updated (81cfd2d -> 9ff6b12)

Posted by Mark Thomas <ma...@apache.org>.
On 19/02/2020 12:37, mgrigorov@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.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org