Author: lektran
Date: Mon Aug 31 13:33:22 2009
New Revision: 809585
URL:
http://svn.apache.org/viewvc?rev=809585&view=revLog:
Fixed problem preventing the correct number of records being determined when setting maxRows for the product search query, reported by Amit Sharma
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java?rev=809585&r1=809584&r2=809585&view=diff==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java Mon Aug 31 13:33:22 2009
@@ -717,7 +717,7 @@
productIds.add(searchResult.getString("mainProductId"));
productIdSet.add(searchResult.getString("mainProductId"));
- while (((searchResult = (GenericValue) eli.next()) != null) && (maxResults == null || numRetreived < maxResults.intValue())) {
+ while ((maxResults == null || numRetreived < maxResults.intValue()) && ((searchResult = (GenericValue) eli.next()) != null)) {
String productId = searchResult.getString("mainProductId");
if (!productIdSet.contains(productId)) {
productIds.add(productId);