tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From violet...@apache.org
Subject svn commit: r1498409 - /tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
Date Mon, 01 Jul 2013 12:26:02 GMT
Author: violetagg
Date: Mon Jul  1 12:26:02 2013
New Revision: 1498409

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

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

Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java?rev=1498409&r1=1498408&r2=1498409&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java Mon Jul  1 12:26:02
2013
@@ -910,9 +910,10 @@ class ApplicationHttpRequest extends Htt
         public AttributeNamesEnumerator() {
             int last = -1;
             parentEnumeration = getRequest().getAttributeNames();
-            for (int i = 0; i < specialAttributes.length; i++) {
+            for (int i = specialAttributes.length - 1; i >= 0; i--) {
                 if (getAttribute(specials[i]) != null) {
                     last = i;
+                    break;
                 }
             }
             this.last = last;



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


Mime
View raw message