ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ash...@apache.org
Subject svn commit: r896420 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java
Date Wed, 06 Jan 2010 12:33:27 GMT
Author: ashish
Date: Wed Jan  6 12:33:27 2010
New Revision: 896420

URL: http://svn.apache.org/viewvc?rev=896420&view=rev
Log:
Avoid NPE - Patch from Akash Jain (Thanks!)

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=896420&r1=896419&r2=896420&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java
(original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java
Wed Jan  6 12:33:27 2010
@@ -270,7 +270,9 @@
 
                     // get only between low and high indexes
                     if (limitView) {
-                        productCategoryMembers = productCategoryMembers.subList(lowIndex-1,
highIndex);
+                        if (UtilValidate.isNotEmpty(productCategoryMembers)) {
+                            productCategoryMembers = productCategoryMembers.subList(lowIndex-1,
highIndex);
+                        }
                     } else {
                         lowIndex = 1;
                         highIndex = listSize;



Mime
View raw message