click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r929451 - in /click/trunk/click: examples/src/org/apache/click/examples/control/html/cssform/CssForm.java extras/src/org/apache/click/extras/control/FormTable.java
Date Wed, 31 Mar 2010 10:00:34 GMT
Author: sabob
Date: Wed Mar 31 10:00:34 2010
New Revision: 929451

URL: http://svn.apache.org/viewvc?rev=929451&view=rev
Log:
guard against null imports

Modified:
    click/trunk/click/examples/src/org/apache/click/examples/control/html/cssform/CssForm.java
    click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java

Modified: click/trunk/click/examples/src/org/apache/click/examples/control/html/cssform/CssForm.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/control/html/cssform/CssForm.java?rev=929451&r1=929450&r2=929451&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/control/html/cssform/CssForm.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/control/html/cssform/CssForm.java
Wed Mar 31 10:00:34 2010
@@ -38,7 +38,10 @@ public class CssForm extends HtmlForm {
         HtmlStringBuffer buffer = new HtmlStringBuffer(512);
 
         // Include the Form default imports
-        buffer.append(super.getHtmlImports());
+        String htmlImports = super.getHtmlImports();
+        if (htmlImports != null) {
+            buffer.append(htmlImports);
+        }
 
         // Include CSS for ContactDetailsForm
         String imports = "<link type=\"text/css\" rel=\"stylesheet\" href=\"{0}/assets/css/cssform{1}.css\"/>\n";

Modified: click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java?rev=929451&r1=929450&r2=929451&view=diff
==============================================================================
--- click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java (original)
+++ click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java Wed Mar 31
10:00:34 2010
@@ -320,8 +320,12 @@ public class FormTable extends Table {
     public String getHtmlImports() {
         HtmlStringBuffer buffer = new HtmlStringBuffer(255);
 
-        buffer.append(super.getHtmlImports());
-        String htmlImports = getControlLink().getHtmlImports();
+        String htmlImports = super.getHtmlImports();
+        if (htmlImports != null) {
+            buffer.append(htmlImports);
+        }
+
+        htmlImports = getControlLink().getHtmlImports();
         if (htmlImports != null) {
             buffer.append(htmlImports);
         }



Mime
View raw message