Author: jleroux
Date: Mon Apr  9 10:44:05 2012
New Revision: 1311195

URL: http://svn.apache.org/viewvc?rev=1311195&view=rev
Log:
The conditionals are unnecessary - FSE will return the original string if the 
string is null or empty, said Adrian


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

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=1311195&r1=1311194&r2=1311195&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java 
(original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Mon 
Apr  9 10:44:05 2012
@@ -2060,10 +2060,7 @@ public class ModelForm extends ModelWidg
             // use the same Interpreter (ie with the same context setup) for 
all evals
             Interpreter bsh = this.getBshInterpreter(context);
             for (AltTarget altTarget: this.altTargets) {
-                String useWhen = altTarget.useWhen;
-                if (useWhen != null && !useWhen.isEmpty()) {
-                    useWhen = FlexibleStringExpander.expandString(useWhen, 
context);
-                }
+                String useWhen = 
FlexibleStringExpander.expandString(altTarget.useWhen, context);
                 Object retVal = 
bsh.eval(StringUtil.convertOperatorSubstitutions(useWhen));
                 boolean condTrue = false;
                 // retVal should be a Boolean, if not something weird is up...


Reply via email to