> On Sep 5, 2023, at 14:07, li...@apache.org wrote:
>
> This is an automated email from the ASF dual-hosted git repository.
>
> lihan pushed a commit to branch main
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
>
>
> The following commit(s) were added to refs/heads/main by this push:
> new d0b655d831 Refactor Request::getSession() to invoke
> Request::getSession(false) internally. (#648)
> d0b655d831 is described below
>
> commit d0b655d8316bcef78b84255a9d8ee2f7cd78d649
> Author: xxeol2 <jhj01...@naver.com>
> AuthorDate: Tue Sep 5 15:07:23 2023 +0900
>
> Refactor Request::getSession() to invoke Request::getSession(false)
> internally. (#648)
Oops, I made a mistake. Correct it Request::getSession(true)
Han
>
> Refactor Request::getSession() to invoke Request::getSession(false)
> internally to eliminate code redundancy.
> ---
> java/org/apache/catalina/connector/Request.java | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/java/org/apache/catalina/connector/Request.java
> b/java/org/apache/catalina/connector/Request.java
> index 82fea929f8..a9ba406047 100644
> --- a/java/org/apache/catalina/connector/Request.java
> +++ b/java/org/apache/catalina/connector/Request.java
> @@ -2288,12 +2288,7 @@ public class Request implements HttpServletRequest {
> */
> @Override
> public HttpSession getSession() {
> - Session session = doGetSession(true);
> - if (session == null) {
> - return null;
> - }
> -
> - return session.getSession();
> + return getSession(true);
> }
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org