Author: doogie
Date: Sat Oct 20 20:41:47 2007
New Revision: 586845
URL:
http://svn.apache.org/viewvc?rev=586845&view=revLog:
Made UtilXml generics usage.
Modified:
ofbiz/trunk/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java
ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java
Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java?rev=586845&r1=586844&r2=586845&view=diff==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java Sat Oct 20 20:41:47 2007
@@ -155,10 +155,7 @@
notify = FastList.newInstance();
notification = new Notification(UtilXml.firstChildElement(e, "notification"));
- List n = UtilXml.childElementList(e, "notify");
- Iterator i = n.iterator();
- while (i.hasNext()) {
- Element e2 = (Element) i.next();
+ for (Element e2: UtilXml.childElementList(e, "notify")) {
notify.add(new Notify(e2));
}
}
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=586845&r1=586844&r2=586845&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 Sat Oct 20 20:41:47 2007
@@ -66,10 +66,7 @@
return;
}
- List serviceEcasElements = UtilXml.childElementList(rootElement, "service-ecas");
- Iterator secasIter = serviceEcasElements.iterator();
- while (secasIter.hasNext()) {
- Element serviceEcasElement = (Element) secasIter.next();
+ for (Element serviceEcasElement: UtilXml.childElementList(rootElement, "service-ecas")) {
ResourceHandler handler = new MainResourceHandler(ServiceConfigUtil.SERVICE_ENGINE_XML_FILENAME, serviceEcasElement);
addEcaDefinitions(handler);
}
@@ -92,11 +89,8 @@
return;
}
- List ecaList = UtilXml.childElementList(rootElement, "eca");
- Iterator ecaIt = ecaList.iterator();
int numDefs = 0;
- while (ecaIt.hasNext()) {
- Element e = (Element) ecaIt.next();
+ for (Element e: UtilXml.childElementList(rootElement, "eca")) {
String serviceName = e.getAttribute("service");
String eventName = e.getAttribute("event");
Map eventMap = (Map) ecaCache.get(serviceName);