Author: lektran
Date: Sat Jul 19 01:10:46 2008
New Revision: 678116
URL:
http://svn.apache.org/viewvc?rev=678116&view=revLog:
minilang's first-from-list operation now sets the field to null if the list is null or empty, previously the field was left unchanged
Modified:
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FirstFromList.java
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FirstFromList.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FirstFromList.java?rev=678116&r1=678115&r2=678116&view=diff==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FirstFromList.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FirstFromList.java Sat Jul 19 01:10:46 2008
@@ -50,12 +50,8 @@
List theList = (List) listAcsr.get(methodContext);
- if (theList == null) {
- if (Debug.infoOn()) Debug.logInfo("List not found with name " + listAcsr + ", doing nothing", module);
- return true;
- }
- if (theList.size() == 0) {
- if (Debug.verboseOn()) Debug.logVerbose("List with name " + listAcsr + " has zero entries, doing nothing", module);
+ if (UtilValidate.isEmpty(theList)) {
+ entryAcsr.put(methodContext, null);
return true;
}