tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r892193 - /tomcat/trunk/java/org/apache/catalina/connector/Request.java
Date Fri, 18 Dec 2009 09:28:01 GMT
Author: markt
Date: Fri Dec 18 09:28:01 2009
New Revision: 892193

URL: http://svn.apache.org/viewvc?rev=892193&view=rev
Log:
Move test for null outside of classloader fun and games so we can exit earlier if there is
no session

Modified:
    tomcat/trunk/java/org/apache/catalina/connector/Request.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=892193&r1=892192&r2=892193&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Fri Dec 18 09:28:01 2009
@@ -2182,6 +2182,8 @@
             // 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 @@
 
         boolean result = false;
         try {
-            if ((session != null) && session.isValid()) {
+            if (session.isValid()) {
                 result = true;
             }
         } finally {



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


Mime
View raw message