svn commit: r990339 - /ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/XmlDsDump.groovy

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

svn commit: r990339 - /ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/XmlDsDump.groovy

jleroux@apache.org
Author: jleroux
Date: Sat Aug 28 10:53:03 2010
New Revision: 990339

URL: http://svn.apache.org/viewvc?rev=990339&view=rev
Log:
A patch from Sascha Rodekamp "Xml Ds Dump Iterator Fix - Webtools" (https://issues.apache.org/jira/browse/OFBIZ-3906) - OFBIZ-3906

Issue with the Xml Export: it seems that there is an issue with the each() loop in Groovy, during the export OFBiz throws a lot of warnings which regards to an wrong used iterator.
So i changed the each() loop into a normal iterator which solves the issue.

Modified:
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/XmlDsDump.groovy

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/XmlDsDump.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/XmlDsDump.groovy?rev=990339&r1=990338&r2=990339&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/XmlDsDump.groovy (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/XmlDsDump.groovy Sat Aug 28 10:53:03 2010
@@ -212,7 +212,8 @@ if (tobrowser) {
                 }
 
                 curNumberWritten = 0;
-                values.each { value ->
+                valuesIter = values.iterator();
+                while ((value = valuesIter.next()) != null) {
                     value.writeXmlText(writer, "");
                     numberWritten++;
                     curNumberWritten++;
@@ -268,7 +269,8 @@ if (tobrowser) {
                     isFirst = true;
                     writer = null;
                     fileSplitNumber = 1;
-                    values.each { value ->
+                    valuesIter = values.iterator();
+                    while ((value = valuesIter.next()) != null) {
                         //Don't bother writing the file if there's nothing
                         //to put into it
                         if (isFirst) {