hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r899920 - /httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java
Date Sat, 16 Jan 2010 11:28:29 GMT
Author: olegk
Date: Sat Jan 16 11:28:29 2010
New Revision: 899920

URL: http://svn.apache.org/viewvc?rev=899920&view=rev
Log:
HTTPCORE-212: minor optimization

Modified:
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java?rev=899920&r1=899919&r2=899920&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java Sat
Jan 16 11:28:29 2010
@@ -169,7 +169,7 @@
      */
     public String toHostString() {
         if (this.port != -1) {
-            CharArrayBuffer buffer = new CharArrayBuffer(32);
+            CharArrayBuffer buffer = new CharArrayBuffer(this.hostname.length() + 6);
             buffer.append(this.hostname);
             buffer.append(":");
             buffer.append(Integer.toString(this.port));



Mime
View raw message