tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From violet...@apache.org
Subject svn commit: r1498368 - /tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
Date Mon, 01 Jul 2013 11:01:38 GMT
Author: violetagg
Date: Mon Jul  1 11:01:38 2013
New Revision: 1498368

URL: http://svn.apache.org/r1498368
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55159
Small performance improvement
Patch provided by Adrian Nistor

Modified:
    tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java

Modified: tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?rev=1498368&r1=1498367&r2=1498368&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java Mon Jul  1 11:01:38
2013
@@ -272,11 +272,12 @@ public class ErrorReportValve extends Va
         trace.append(t.toString()).append('\n');
         StackTraceElement[] elements = t.getStackTrace();
         int pos = elements.length;
-        for (int i = 0; i < elements.length; i++) {
+        for (int i = elements.length - 1; i >= 0; i--) {
             if ((elements[i].getClassName().startsWith
                  ("org.apache.catalina.core.ApplicationFilterChain"))
                 && (elements[i].getMethodName().equals("internalDoFilter"))) {
                 pos = i;
+                break;
             }
         }
         for (int i = 0; i < pos; i++) {



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


Mime
View raw message