svn commit: r1001325 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1001325 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java

jonesde
Author: jonesde
Date: Sat Sep 25 22:18:12 2010
New Revision: 1001325

URL: http://svn.apache.org/viewvc?rev=1001325&view=rev
Log:
Fixed NPE when a form field use-when attribute evaluates to null

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=1001325&r1=1001324&r2=1001325&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java Sat Sep 25 22:18:12 2010
@@ -1156,7 +1156,7 @@ public class ModelFormField {
                     condTrue = boolVal.booleanValue();
                 } else {
                     throw new IllegalArgumentException("Return value from use-when condition eval was not a Boolean: "
-                            + retVal.getClass().getName() + " [" + retVal + "] on the field " + this.name + " of form " + this.modelForm.getName());
+                            + (retVal != null ? retVal.getClass().getName() : "null") + " [" + retVal + "] on the field " + this.name + " of form " + this.modelForm.getName());
                 }
 
                 return condTrue;