Move test for null outside of classloader fun and games so we can exit earlier if...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 18 Dec 2009 09:28:01 +0000 (09:28 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 18 Dec 2009 09:28:01 +0000 (09:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@892193 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/connector/Request.java

index e8543fe..70e3d17 100644 (file)
@@ -2182,6 +2182,8 @@ public class Request
             // Can't find the session 
         }
 
+        if (session == null) return false;
+
         // The call to session.isValid() can trigger session listeners so make
         // sure we are using the webapp's class loader in case the listeners are
         // triggered
@@ -2195,7 +2197,7 @@ public class Request
 
         boolean result = false;
         try {
-            if ((session != null) && session.isValid()) {
+            if (session.isValid()) {
                 result = true;
             }
         } finally {