svn commit: r901880 - /ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Iterate.java

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

svn commit: r901880 - /ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Iterate.java

lektran
Author: lektran
Date: Thu Jan 21 22:02:14 2010
New Revision: 901880

URL: http://svn.apache.org/viewvc?rev=901880&view=rev
Log:
Fix bug reported by Mridul Pathak, the minilang iterate tag was unable to iterate over a Set

Modified:
    ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Iterate.java

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Iterate.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Iterate.java?rev=901880&r1=901879&r2=901880&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Iterate.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Iterate.java Thu Jan 21 22:02:14 2010
@@ -105,14 +105,14 @@
                 }
             }
         } else if (objList instanceof Collection) {
-            Collection<Object> theList = UtilGenerics.checkList(objList);
+            Collection<Object> theCollection = UtilGenerics.checkCollection(objList);
 
-            if (theList.size() == 0) {
-                if (Debug.verboseOn()) Debug.logVerbose("List with name " + listAcsr + " has zero entries, doing nothing: " + rawString(), module);
+            if (theCollection.size() == 0) {
+                if (Debug.verboseOn()) Debug.logVerbose("Collection with name " + listAcsr + " has zero entries, doing nothing: " + rawString(), module);
                 return true;
             }
 
-            for (Object theEntry: theList) {
+            for (Object theEntry: theCollection) {
                 entryAcsr.put(methodContext, theEntry);
 
                 if (!SimpleMethod.runSubOps(subOps, methodContext)) {