svn commit: r429249 - in /incubator/ofbiz/trunk/framework: base/src/base/org/ofbiz/base/util/ entityext/src/org/ofbiz/entityext/eca/ minilang/src/org/ofbiz/minilang/method/conditional/ minilang/src/org/ofbiz/minilang/method/ifops/ minilang/src/org/ofbi...

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

svn commit: r429249 - in /incubator/ofbiz/trunk/framework: base/src/base/org/ofbiz/base/util/ entityext/src/org/ofbiz/entityext/eca/ minilang/src/org/ofbiz/minilang/method/conditional/ minilang/src/org/ofbiz/minilang/method/ifops/ minilang/src/org/ofbi...

jonesde
Author: jonesde
Date: Sun Aug  6 23:11:08 2006
New Revision: 429249

URL: http://svn.apache.org/viewvc?rev=429249&view=rev
Log:
Addressed some issues with i18n stuff and comparisons, type conversions; for numbers spaces are removed before parsing; for comparing with constants the en locale is assumed, ie the right value or value2 is mean to be a constant (we might have to do something with expanded strings here, but there string expansion should also generally expand numbers in the system or en locale; may still be an issue there, but the FlexibleStringExpander does a toString to this should be fine); this should fix Apahce Jira OFBIZ-133 and OFBIZ-136

Modified:
    incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/ObjectType.java
    incubator/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaCondition.java
    incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java
    incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareFieldCondition.java
    incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompare.java
    incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompareField.java
    incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/BaseCompare.java
    incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/Compare.java
    incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/CompareField.java
    incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java
    incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaRule.java
    incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java
    incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java
    incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java

Modified: incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/ObjectType.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/ObjectType.java?rev=429249&r1=429248&r2=429249&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/ObjectType.java (original)
+++ incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/ObjectType.java Sun Aug  6 23:11:08 2006
@@ -467,13 +467,15 @@
             if (str.length() == 0) {
                 return null;
             }
-
+            
             if ("Boolean".equals(type) || "java.lang.Boolean".equals(type)) {
+             str = StringUtil.removeSpaces(str);
                 Boolean value = null;
-                if (str.equalsIgnoreCase("TRUE"))
+                if (str.equalsIgnoreCase("TRUE")) {
                     value = new Boolean(true);
-                else
+                } else {
                     value = new Boolean(false);
+                }
                 return value;
             } else if ("Locale".equals(type) || "java.util.Locale".equals(type)) {
                 Locale loc = UtilMisc.parseLocale(str);
@@ -483,6 +485,7 @@
                     throw new GeneralException("Could not convert " + str + " to " + type + ": ");    
                 }
             } else if ("BigDecimal".equals(type) || "java.math.BigDecimal".equals(type)) {
+             str = StringUtil.removeSpaces(str);
                 try {
                     NumberFormat nf = null;
                     if (locale == null) {
@@ -496,6 +499,7 @@
                     throw new GeneralException("Could not convert " + str + " to " + type + ": ", e);
                 }
             } else if ("Double".equals(type) || "java.lang.Double".equals(type)) {
+             str = StringUtil.removeSpaces(str);
                 try {
                     NumberFormat nf = null;
                     if (locale == null) {
@@ -510,6 +514,7 @@
                     throw new GeneralException("Could not convert " + str + " to " + type + ": ", e);
                 }
             } else if ("Float".equals(type) || "java.lang.Float".equals(type)) {
+             str = StringUtil.removeSpaces(str);
                 try {
                     NumberFormat nf = null;
                     if (locale == null) {
@@ -524,6 +529,7 @@
                     throw new GeneralException("Could not convert " + str + " to " + type + ": ", e);
                 }
             } else if ("Long".equals(type) || "java.lang.Long".equals(type)) {
+             str = StringUtil.removeSpaces(str);
                 try {
                     NumberFormat nf = null;
                     if (locale == null) {
@@ -539,6 +545,7 @@
                     throw new GeneralException("Could not convert " + str + " to " + type + ": ", e);
                 }
             } else if ("Integer".equals(type) || "java.lang.Integer".equals(type)) {
+             str = StringUtil.removeSpaces(str);
                 try {
                     NumberFormat nf = null;
                     if (locale == null) {
@@ -901,7 +908,7 @@
     }
 
     public static Boolean doRealCompare(Object value1, Object value2, String operator, String type, String format,
-        List messages, Locale locale, ClassLoader loader) {
+        List messages, Locale locale, ClassLoader loader, boolean value2InlineConstant) {
         boolean verboseOn = Debug.verboseOn();
 
         if (verboseOn) Debug.logVerbose("Comparing value1: \"" + value1 + "\" " + operator + " value2:\"" + value2 + "\"", module);
@@ -932,8 +939,12 @@
 
         Object convertedValue2 = null;
         if (value2 != null) {
+         Locale value2Locale = locale;
+         if (value2InlineConstant) {
+         value2Locale = UtilMisc.parseLocale("en");
+         }
             try {
-                convertedValue2 = ObjectType.simpleTypeConvert(value2, type, format, locale);
+                convertedValue2 = ObjectType.simpleTypeConvert(value2, type, format, value2Locale);
             } catch (GeneralException e) {
                 Debug.logError(e, module);
                 messages.add("Could not convert value2 for comparison: " + e.getMessage());

Modified: incubator/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaCondition.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaCondition.java?rev=429249&r1=429248&r2=429249&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaCondition.java (original)
+++ incubator/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaCondition.java Sun Aug  6 23:11:08 2006
@@ -87,7 +87,7 @@
 
         // evaluate the condition & invoke the action(s)
         List messages = new LinkedList();
-        Boolean cond = ObjectType.doRealCompare(lhsValue, rhsValue, operator, compareType, format, messages, null, dctx.getClassLoader());
+        Boolean cond = ObjectType.doRealCompare(lhsValue, rhsValue, operator, compareType, format, messages, null, dctx.getClassLoader(), constant);
 
         // if any messages were returned send them out
         if (messages.size() > 0) {

Modified: incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java?rev=429249&r1=429248&r2=429249&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java (original)
+++ incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java Sun Aug  6 23:11:08 2006
@@ -65,7 +65,7 @@
         Object fieldVal = getFieldVal(methodContext);
 
         List messages = new LinkedList();
-        Boolean resultBool = BaseCompare.doRealCompare(fieldVal, value, operator, type, format, messages, null, methodContext.getLoader());
+        Boolean resultBool = BaseCompare.doRealCompare(fieldVal, value, operator, type, format, messages, null, methodContext.getLoader(), true);
         if (messages.size() > 0) {
             messages.add(0, "Error with comparison in if-compare between field [" + mapAcsr.toString() + "." + fieldAcsr.toString() + "] with value [" + fieldVal + "] and value [" + value + "] with operator [" + operator + "] and type [" + type + "]: ");
             if (methodContext.getMethodType() == MethodContext.EVENT) {

Modified: incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareFieldCondition.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareFieldCondition.java?rev=429249&r1=429248&r2=429249&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareFieldCondition.java (original)
+++ incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareFieldCondition.java Sun Aug  6 23:11:08 2006
@@ -72,7 +72,7 @@
         Object fieldVal2 = getFieldVal2(methodContext);
 
         List messages = new LinkedList();
-        Boolean resultBool = BaseCompare.doRealCompare(fieldVal1, fieldVal2, operator, type, format, messages, null, methodContext.getLoader());
+        Boolean resultBool = BaseCompare.doRealCompare(fieldVal1, fieldVal2, operator, type, format, messages, null, methodContext.getLoader(), false);
 
         if (messages.size() > 0) {
             messages.add(0, "Error with comparison in if-compare-field between fields [" + mapAcsr.toString() + "." + fieldAcsr.toString() + "] with value [" + fieldVal1 + "] and [" + toMapAcsr.toString() + "." + toFieldAcsr.toString() + "] with value [" + fieldVal2 + "] with operator [" + operator + "] and type [" + type + "]: ");

Modified: incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompare.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompare.java?rev=429249&r1=429248&r2=429249&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompare.java (original)
+++ incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompare.java Sun Aug  6 23:11:08 2006
@@ -17,6 +17,8 @@
 
 import java.util.*;
 
+import javolution.util.FastList;
+
 import org.w3c.dom.*;
 import org.ofbiz.base.util.*;
 import org.ofbiz.minilang.*;
@@ -91,8 +93,8 @@
             fieldVal = "";
         }
 
-        List messages = new LinkedList();
-        Boolean resultBool = BaseCompare.doRealCompare(fieldVal, value, operator, type, format, messages, null, methodContext.getLoader());
+        List messages = FastList.newInstance();
+        Boolean resultBool = BaseCompare.doRealCompare(fieldVal, value, operator, type, format, messages, null, methodContext.getLoader(), true);
         if (messages.size() > 0) {
             messages.add(0, "Error with comparison in if-compare between field [" + mapAcsr.toString() + "." + fieldAcsr.toString() + "] with value [" + fieldVal + "] and value [" + value + "] with operator [" + operator + "] and type [" + type + "]: ");
             if (methodContext.getMethodType() == MethodContext.EVENT) {

Modified: incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompareField.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompareField.java?rev=429249&r1=429248&r2=429249&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompareField.java (original)
+++ incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompareField.java Sun Aug  6 23:11:08 2006
@@ -108,7 +108,7 @@
         }
 
         List messages = new LinkedList();
-        Boolean resultBool = BaseCompare.doRealCompare(fieldVal1, fieldVal2, operator, type, format, messages, null, methodContext.getLoader());
+        Boolean resultBool = BaseCompare.doRealCompare(fieldVal1, fieldVal2, operator, type, format, messages, null, methodContext.getLoader(), false);
 
         if (messages.size() > 0) {
             messages.add(0, "Error with comparison in if-compare-field between fields [" + mapAcsr.toString() + "." + fieldAcsr.toString() + "] with value [" + fieldVal1 + "] and [" + toMapAcsr.toString() + "." + toFieldAcsr.toString() + "] with value [" + fieldVal2 + "] with operator [" + operator + "] and type [" + type + "]: ");

Modified: incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/BaseCompare.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/BaseCompare.java?rev=429249&r1=429248&r2=429249&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/BaseCompare.java (original)
+++ incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/BaseCompare.java Sun Aug  6 23:11:08 2006
@@ -51,8 +51,8 @@
          */
     }
 
-    public void doCompare(Object value1, Object value2, List messages, Locale locale, ClassLoader loader) {
-        Boolean success = BaseCompare.doRealCompare(value1, value2, this.operator, this.type, this.format, messages, locale, loader);
+    public void doCompare(Object value1, Object value2, List messages, Locale locale, ClassLoader loader, boolean value2InlineConstant) {
+        Boolean success = BaseCompare.doRealCompare(value1, value2, this.operator, this.type, this.format, messages, locale, loader, value2InlineConstant);
 
         if (success != null && success.booleanValue() == false) {
             addMessage(messages, loader, locale);
@@ -62,7 +62,7 @@
     public void exec(Map inMap, Map results, List messages, Locale locale, ClassLoader loader) {}
 
     public static Boolean doRealCompare(Object value1, Object value2, String operator, String type, String format,
-        List messages, Locale locale, ClassLoader loader) {
-        return ObjectType.doRealCompare(value1, value2, operator, type, format, messages, locale, loader);
+        List messages, Locale locale, ClassLoader loader, boolean value2InlineConstant) {
+        return ObjectType.doRealCompare(value1, value2, operator, type, format, messages, locale, loader, value2InlineConstant);
     }
 }

Modified: incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/Compare.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/Compare.java?rev=429249&r1=429248&r2=429249&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/Compare.java (original)
+++ incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/Compare.java Sun Aug  6 23:11:08 2006
@@ -37,6 +37,6 @@
     public void exec(Map inMap, Map results, List messages, Locale locale, ClassLoader loader) {
         Object fieldValue = inMap.get(fieldName);
 
-        doCompare(fieldValue, value, messages, locale, loader);
+        doCompare(fieldValue, value, messages, locale, loader, true);
     }
 }

Modified: incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/CompareField.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/CompareField.java?rev=429249&r1=429248&r2=429249&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/CompareField.java (original)
+++ incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/CompareField.java Sun Aug  6 23:11:08 2006
@@ -38,6 +38,6 @@
         Object compareValue = inMap.get(compareName);
         Object fieldValue = inMap.get(fieldName);
 
-        doCompare(fieldValue, compareValue, messages, locale, loader);
+        doCompare(fieldValue, compareValue, messages, locale, loader, false);
     }
 }

Modified: incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java?rev=429249&r1=429248&r2=429249&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java (original)
+++ incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java Sun Aug  6 23:11:08 2006
@@ -154,7 +154,7 @@
 
         // evaluate the condition & invoke the action(s)
         List messages = new LinkedList();
-        Boolean cond = ObjectType.doRealCompare(lhsValue, rhsValue, operator, compareType, format, messages, null, dctx.getClassLoader());
+        Boolean cond = ObjectType.doRealCompare(lhsValue, rhsValue, operator, compareType, format, messages, null, dctx.getClassLoader(), isConstant);
 
         // if any messages were returned send them out
         if (messages.size() > 0) {

Modified: incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaRule.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaRule.java?rev=429249&r1=429248&r2=429249&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaRule.java (original)
+++ incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaRule.java Sun Aug  6 23:11:08 2006
@@ -56,21 +56,18 @@
 
         List condList = UtilXml.childElementList(eca, "condition");
         Iterator ci = condList.iterator();
-
         while (ci.hasNext()) {
             conditions.add(new ServiceEcaCondition((Element) ci.next(), true, false));
         }
 
         List condFList = UtilXml.childElementList(eca, "condition-field");
         Iterator cfi = condFList.iterator();
-
         while (cfi.hasNext()) {
             conditions.add(new ServiceEcaCondition((Element) cfi.next(), false, false));
         }
 
         List condSList = UtilXml.childElementList(eca, "condition-service");
         Iterator sfi = condSList.iterator();
-
         while (sfi.hasNext()) {
             conditions.add(new ServiceEcaCondition((Element) sfi.next(), false, true));
         }
@@ -79,7 +76,6 @@
 
         List actList = UtilXml.childElementList(eca, "action");
         Iterator ai = actList.iterator();
-
         while (ai.hasNext()) {
             Element actionElement = (Element) ai.next();
             actions.add(new ServiceEcaAction(actionElement, eventName));

Modified: incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java?rev=429249&r1=429248&r2=429249&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java (original)
+++ incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java Sun Aug  6 23:11:08 2006
@@ -21,6 +21,8 @@
 import java.util.List;
 import java.util.Map;
 
+import javolution.util.FastList;
+
 import org.apache.oro.text.regex.MalformedPatternException;
 import org.apache.oro.text.regex.Pattern;
 import org.apache.oro.text.regex.PatternCompiler;
@@ -95,7 +97,7 @@
     }
     
     public static List readSubConditions(ModelMenuItem modelMenuItem, Element conditionElement) {
-        List condList = new LinkedList();
+        List condList = FastList.newInstance();
         List subElementList = UtilXml.childElementList(conditionElement);
         Iterator subElementIter = subElementList.iterator();
         while (subElementIter.hasNext()) {
@@ -342,8 +344,8 @@
                 fieldVal = "";
             }
 
-            List messages = new LinkedList();
-            Boolean resultBool = BaseCompare.doRealCompare(fieldVal, value, operator, type, format, messages, null, null);
+            List messages = FastList.newInstance();
+            Boolean resultBool = BaseCompare.doRealCompare(fieldVal, value, operator, type, format, messages, null, null, true);
             if (messages.size() > 0) {
                 messages.add(0, "Error with comparison in if-compare between field [" + fieldAcsr.toString() + "] with value [" + fieldVal + "] and value [" + value + "] with operator [" + operator + "] and type [" + type + "]: ");
 
@@ -391,8 +393,8 @@
                 fieldVal = "";
             }
 
-            List messages = new LinkedList();
-            Boolean resultBool = BaseCompare.doRealCompare(fieldVal, toFieldVal, operator, type, format, messages, null, null);
+            List messages = FastList.newInstance();
+            Boolean resultBool = BaseCompare.doRealCompare(fieldVal, toFieldVal, operator, type, format, messages, null, null, false);
             if (messages.size() > 0) {
                 messages.add(0, "Error with comparison in if-compare-field between field [" + fieldAcsr.toString() + "] with value [" + fieldVal + "] and to-field [" + toFieldVal.toString() + "] with value [" + toFieldVal + "] with operator [" + operator + "] and type [" + type + "]: ");
 

Modified: incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java?rev=429249&r1=429248&r2=429249&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java (original)
+++ incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java Sun Aug  6 23:11:08 2006
@@ -22,6 +22,8 @@
 import java.util.List;
 import java.util.Map;
 
+import javolution.util.FastList;
+
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.base.util.ObjectType;
@@ -77,7 +79,7 @@
     }
     
     public static List readSubConditions(ModelScreen modelScreen, Element conditionElement) {
-        List condList = new LinkedList();
+        List condList = FastList.newInstance();
         List subElementList = UtilXml.childElementList(conditionElement);
         Iterator subElementIter = subElementList.iterator();
         while (subElementIter.hasNext()) {
@@ -324,8 +326,8 @@
                 fieldVal = "";
             }
 
-            List messages = new LinkedList();
-            Boolean resultBool = BaseCompare.doRealCompare(fieldVal, value, operator, type, format, messages, null, null);
+            List messages = FastList.newInstance();
+            Boolean resultBool = BaseCompare.doRealCompare(fieldVal, value, operator, type, format, messages, null, null, true);
             if (messages.size() > 0) {
                 messages.add(0, "Error with comparison in if-compare between field [" + fieldAcsr.toString() + "] with value [" + fieldVal + "] and value [" + value + "] with operator [" + operator + "] and type [" + type + "]: ");
 
@@ -373,8 +375,8 @@
                 fieldVal = "";
             }
 
-            List messages = new LinkedList();
-            Boolean resultBool = BaseCompare.doRealCompare(fieldVal, toFieldVal, operator, type, format, messages, null, null);
+            List messages = FastList.newInstance();
+            Boolean resultBool = BaseCompare.doRealCompare(fieldVal, toFieldVal, operator, type, format, messages, null, null, false);
             if (messages.size() > 0) {
                 messages.add(0, "Error with comparison in if-compare-field between field [" + fieldAcsr.toString() + "] with value [" + fieldVal + "] and to-field [" + toFieldAcsr.toString() + "] with value [" + toFieldVal + "] with operator [" + operator + "] and type [" + type + "]: ");
 

Modified: incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java?rev=429249&r1=429248&r2=429249&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java (original)
+++ incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java Sun Aug  6 23:11:08 2006
@@ -21,6 +21,8 @@
 import java.util.List;
 import java.util.Map;
 
+import javolution.util.FastList;
+
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.base.util.ObjectType;
@@ -76,7 +78,7 @@
     }
     
     public static List readSubConditions(ModelTree modelTree, Element conditionElement) {
-        List condList = new LinkedList();
+        List condList = FastList.newInstance();
         List subElementList = UtilXml.childElementList(conditionElement);
         Iterator subElementIter = subElementList.iterator();
         while (subElementIter.hasNext()) {
@@ -323,8 +325,8 @@
                 fieldVal = "";
             }
 
-            List messages = new LinkedList();
-            Boolean resultBool = BaseCompare.doRealCompare(fieldVal, value, operator, type, format, messages, null, null);
+            List messages = FastList.newInstance();
+            Boolean resultBool = BaseCompare.doRealCompare(fieldVal, value, operator, type, format, messages, null, null, true);
             if (messages.size() > 0) {
                 messages.add(0, "Error with comparison in if-compare between field [" + fieldAcsr.toString() + "] with value [" + fieldVal + "] and value [" + value + "] with operator [" + operator + "] and type [" + type + "]: ");
 
@@ -372,8 +374,8 @@
                 fieldVal = "";
             }
 
-            List messages = new LinkedList();
-            Boolean resultBool = BaseCompare.doRealCompare(fieldVal, toFieldVal, operator, type, format, messages, null, null);
+            List messages = FastList.newInstance();
+            Boolean resultBool = BaseCompare.doRealCompare(fieldVal, toFieldVal, operator, type, format, messages, null, null, false);
             if (messages.size() > 0) {
                 messages.add(0, "Error with comparison in if-compare-field between field [" + fieldAcsr.toString() + "] with value [" + fieldVal + "] and to-field [" + toFieldVal.toString() + "] with value [" + toFieldVal + "] with operator [" + operator + "] and type [" + type + "]: ");