You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2007/10/19 16:12:06 UTC

svn commit: r586464 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java

Author: doogie
Date: Fri Oct 19 07:12:06 2007
New Revision: 586464

URL: http://svn.apache.org/viewvc?rev=586464&view=rev
Log:
Collapse the nested collections in getServiceEventRules.

Modified:
    ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java?rev=586464&r1=586463&r2=586464&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java Fri Oct 19 07:12:06 2007
@@ -26,6 +26,7 @@
 import java.util.TreeSet;
 import java.util.Collection;
 
+import javolution.util.FastList;
 import javolution.util.FastMap;
 
 import org.ofbiz.base.component.ComponentConfig;
@@ -138,7 +139,13 @@
             if (event != null) {
                 return (Collection) eventMap.get(event);
             } else {
-                return eventMap.values();
+                List rules = FastList.newInstance();
+                Iterator it = eventMap.values().iterator();
+                while (it.hasNext()) {
+                    Collection col = (Collection) it.next();
+                    rules.addAll(col);
+                }
+                return rules;
             }
         }
         return null;