Re: loop code simplification

2012-03-21 Thread Prince Sewani
Well I don't know why is it suggested so as in the mail by Paul, But as I already mentioned : - Forwarded Message - From: Prince Sewani To: "dev@ofbiz.apache.org" Sent: Tuesday, March 20, 2012 5:46 PM Subject: Re: loop code simplification Well If we're talking

Re: loop code simplification

2012-03-20 Thread Scott Gray
ses != null && typePurposes.hasNext()) { >>>> (ContactMechWorker.java line 606) >>>> >>>> Can it be simplified to for(GenericValue contactMechTypePurpose : >>>> theList) ? Or should I keep it like it is ? >>>> >>>> Regards, >>>> >>>> -- >>>> Erwan de FERRIERES >>>> www.nereide.biz >>>> >>> >>> - >>> -- >>> Coherent Software Australia Pty Ltd >>> http://www.cohsoft.com.au/ >>> >>> Bonsai ERP, the all-inclusive ERP system >>> http://www.bonsaierp.com.au/ >>> >>> -- >>> View this message in context: >>> http://ofbiz.135035.n4.nabble.com/loop-code-simplification-tp4487741p4488324.html >>> Sent from the OFBiz - Dev mailing list archive at Nabble.com. > > > > -- > Erwan de FERRIERES

Re: loop code simplification

2012-03-20 Thread Erwan de FERRIERES
simplified to for(GenericValue contactMechTypePurpose : >>> theList) ? Or should I keep it like it is ? >>> >>> Regards, >>> >>> -- >>> Erwan de FERRIERES >>> www.nereide.biz >>> >> >> - >> -- >> Coherent Software Australia Pty Ltd >> http://www.cohsoft.com.au/ >> >> Bonsai ERP, the all-inclusive ERP system >> http://www.bonsaierp.com.au/ >> >> -- >> View this message in context: >> http://ofbiz.135035.n4.nabble.com/loop-code-simplification-tp4487741p4488324.html >> Sent from the OFBiz - Dev mailing list archive at Nabble.com. -- Erwan de FERRIERES

Re: loop code simplification

2012-03-20 Thread Jacques Le Roux
t like it is ? Regards, -- Erwan de FERRIERES www.nereide.biz - -- Coherent Software Australia Pty Ltd http://www.cohsoft.com.au/ Bonsai ERP, the all-inclusive ERP system http://www.bonsaierp.com.au/ -- View this message in context: http://ofbiz.135035.n4.nabble.com/loop-code-simplification-tp44

Re: loop code simplification

2012-03-20 Thread Prince Sewani
(Test.java:11) but if I replace the ArrayList declaration with : static ArrayList t = new ArrayList(); then the output will beĀ  : before=== after=== Hope this helps. Regards Prince From: Paul Foxworthy To: dev@ofbiz.apache.org Sent: Tuesday, M

Re: loop code simplification

2012-03-20 Thread Paul Foxworthy
, the all-inclusive ERP system http://www.bonsaierp.com.au/ -- View this message in context: http://ofbiz.135035.n4.nabble.com/loop-code-simplification-tp4487741p4488324.html Sent from the OFBiz - Dev mailing list archive at Nabble.com.

loop code simplification

2012-03-19 Thread Erwan de FERRIERES
Hi, I'm trying to remove a lot of iterators, and use the for-each syntax, which exists since java 1.5. During my journey, I found a lot of double tests for a while like this one: while (typePurposes != null && typePurposes.hasNext()) { (ContactMechWorker.java line 606) Can it be simplified to