click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r751537 - /incubator/click/trunk/click/extras/src/org/apache/click/extras/control/AbstractContainerField.java
Date Sun, 08 Mar 2009 21:41:25 GMT
Author: sabob
Date: Sun Mar  8 21:41:25 2009
New Revision: 751537

URL: http://svn.apache.org/viewvc?rev=751537&view=rev
Log:
performance improvement for HTML imports

Modified:
    incubator/click/trunk/click/extras/src/org/apache/click/extras/control/AbstractContainerField.java

Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/control/AbstractContainerField.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/control/AbstractContainerField.java?rev=751537&r1=751536&r2=751537&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/control/AbstractContainerField.java
(original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/control/AbstractContainerField.java
Sun Mar  8 21:41:25 2009
@@ -199,9 +199,9 @@
      * and JavaScript files
      */
     public String getHtmlImports() {
-        HtmlStringBuffer buffer = new HtmlStringBuffer(512);
-
         if (hasControls()) {
+            HtmlStringBuffer buffer = new HtmlStringBuffer(0);
+
             for (int i = 0, size = getControls().size(); i < size; i++) {
                 Control control = (Control) getControls().get(i);
                 String htmlImports = control.getHtmlImports();
@@ -209,9 +209,9 @@
                     buffer.append(htmlImports);
                 }
             }
+            return buffer.toString();
         }
-
-        return buffer.toString();
+        return null;
     }
 
     /**



Mime
View raw message