Author: ashish
Date: Wed Jan 6 12:33:27 2010
New Revision: 896420
URL:
http://svn.apache.org/viewvc?rev=896420&view=revLog:
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;