danwatford commented on code in PR #517: URL: https://github.com/apache/ofbiz-framework/pull/517#discussion_r1157502903
########## framework/webtools/groovyScripts/entity/XmlDsDump.groovy: ########## @@ -17,151 +17,158 @@ * under the License. */ -import java.util.* -import java.io.* -import org.apache.ofbiz.base.util.* -import org.apache.ofbiz.entity.model.* -import org.apache.ofbiz.entity.util.* -import org.apache.ofbiz.entity.transaction.* -import org.apache.ofbiz.entity.condition.* +import org.apache.ofbiz.base.util.Debug +import org.apache.ofbiz.base.util.UtilFormatOut +import org.apache.ofbiz.entity.condition.EntityComparisonOperator +import org.apache.ofbiz.entity.condition.EntityCondition +import org.apache.ofbiz.entity.condition.EntityJoinOperator +import org.apache.ofbiz.entity.model.ModelViewEntity +import org.apache.ofbiz.entity.transaction.TransactionUtil +import org.apache.ofbiz.entity.util.EntityFindOptions outpath = parameters.outpath filename = parameters.filename maxRecStr = parameters.maxrecords entitySyncId = parameters.entitySyncId passedEntityNames = null -if (parameters.entityName) passedEntityNames = parameters.entityName instanceof Collection ? parameters.entityName as TreeSet : [parameters.entityName] as TreeSet +if (parameters.entityName) { + passedEntityNames = parameters.entityName instanceof Collection ? parameters.entityName as TreeSet : [parameters.entityName] as TreeSet +} // get the max records per file setting and convert to a int -maxRecordsPerFile = 0 -if (maxRecStr) { - try { - maxRecordsPerFile = Integer.parseInt(maxRecStr) - } - catch (Exception e) { - } -} +int maxRecordsPerFile = maxRecStr ? (maxRecStr as int) : 0 Review Comment: I don't think this should have been resolved - as far as I can tell the potential error still exists on line 39, but would not have occurred in the code used prior to this PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ofbiz.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org