tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1024355 - /tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java
Date Tue, 19 Oct 2010 18:51:44 GMT
Author: markt
Date: Tue Oct 19 18:51:44 2010
New Revision: 1024355

URL: http://svn.apache.org/viewvc?rev=1024355&view=rev
Log:
Minor clean-up

Modified:
    tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java?rev=1024355&r1=1024354&r2=1024355&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java Tue Oct 19 18:51:44
2010
@@ -28,6 +28,7 @@ import javax.servlet.ServletRequestListe
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.catalina.Container;
+import org.apache.catalina.Context;
 import org.apache.catalina.Globals;
 import org.apache.catalina.Wrapper;
 import org.apache.catalina.comet.CometEvent;
@@ -170,10 +171,9 @@ final class StandardContextValve
 
         ServletRequestEvent event = null;
 
-        if ((instances != null) 
-                && (instances.length > 0)) {
+        if ((instances != null) && (instances.length > 0)) {
             event = new ServletRequestEvent
-                (((StandardContext) container).getServletContext(), 
+                (((Context) container).getServletContext(), 
                  request.getRequest());
             // create pre-service event
             for (int i = 0; i < instances.length; i++) {
@@ -189,8 +189,9 @@ final class StandardContextValve
                     }
                 } catch (Throwable t) {
                     ExceptionUtils.handleThrowable(t);
-                    container.getLogger().error(sm.getString("standardContext.requestListener.requestInit",
-                                     instances[i].getClass().getName()), t);
+                    container.getLogger().error(sm.getString(
+                            "standardContext.requestListener.requestInit",
+                            instances[i].getClass().getName()), t);
                     ServletRequest sreq = request.getRequest();
                     sreq.setAttribute(Globals.EXCEPTION_ATTR,t);
                     return;
@@ -202,8 +203,7 @@ final class StandardContextValve
         }
         wrapper.getPipeline().getFirst().invoke(request, response);
 
-        if ((instances !=null ) &&
-                (instances.length > 0)) {
+        if ((instances !=null ) && (instances.length > 0)) {
             // create post-service event
             for (int i = 0; i < instances.length; i++) {
                 int j = (instances.length -1) -i;
@@ -219,14 +219,14 @@ final class StandardContextValve
                     }
                 } catch (Throwable t) {
                     ExceptionUtils.handleThrowable(t);
-                    container.getLogger().error(sm.getString("standardContext.requestListener.requestDestroy",
-                                     instances[j].getClass().getName()), t);
+                    container.getLogger().error(sm.getString(
+                            "standardContext.requestListener.requestDestroy",
+                            instances[j].getClass().getName()), t);
                     ServletRequest sreq = request.getRequest();
                     sreq.setAttribute(Globals.EXCEPTION_ATTR,t);
                 }
             }
         }
-                
     }
 
 



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


Mime
View raw message