hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1538607 - in /httpcomponents/httpcore/trunk: RELEASE_NOTES.txt httpcore/src/main/java/org/apache/http/message/HeaderGroup.java
Date Mon, 04 Nov 2013 13:58:34 GMT
Author: olegk
Date: Mon Nov  4 13:58:33 2013
New Revision: 1538607

URL: http://svn.apache.org/r1538607
Log:
HTTPCORE-361: Reduced intermediate garbage in HeaderGroup#getFirstHeader()

Modified:
    httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java

Modified: httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt?rev=1538607&r1=1538606&r2=1538607&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpcore/trunk/RELEASE_NOTES.txt Mon Nov  4 13:58:33 2013
@@ -1,6 +1,9 @@
 Changes since 4.3
 -------------------
 
+* [HTTPCORE-361] Reduced intermediate garbage in HeaderGroup#getFirstHeader()
+  Contributed by Oleg Kalnichevski <olegk at apache.org>
+
 * [HTTPCORE-355] HttpAsyncRequestExecutor fails when its handler is not ready to generate
   a request.
   Contributed by jd <j1234d2003 at yahoo.com>

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java?rev=1538607&r1=1538606&r2=1538607&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java
Mon Nov  4 13:58:33 2013
@@ -190,7 +190,8 @@ public class HeaderGroup implements Clon
      * @return the first header or <code>null</code>
      */
     public Header getFirstHeader(final String name) {
-        for (final Header header : headers) {
+        for (int i = 0; i < this.headers.size(); i++) {
+            final Header header = this.headers.get(i);
             if (header.getName().equalsIgnoreCase(name)) {
                 return header;
             }



Mime
View raw message