This is an automated email from the ASF dual-hosted git repository.

lihan pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 2cd8eff7b5 Refactor Request::getSession() to invoke 
Request::getSession(true) internally. (#648)
2cd8eff7b5 is described below

commit 2cd8eff7b587504d1afc89b8af6d92862e605904
Author: xxeol2 <jhj01...@naver.com>
AuthorDate: Tue Sep 5 15:07:23 2023 +0900

    Refactor Request::getSession() to invoke Request::getSession(true) 
internally. (#648)
    
    Refactor Request::getSession() to invoke Request::getSession(true) 
internally to eliminate code redundancy.
    
    (cherry picked from commit d0b655d8316bcef78b84255a9d8ee2f7cd78d649)
---
 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 cebd50640c..40ec9d9c07 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -2395,12 +2395,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

Reply via email to