svn commit: r809585 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java

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

svn commit: r809585 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java

lektran
Author: lektran
Date: Mon Aug 31 13:33:22 2009
New Revision: 809585

URL: http://svn.apache.org/viewvc?rev=809585&view=rev
Log:
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);