svn commit: r677164 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java

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

svn commit: r677164 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java

lektran
Author: lektran
Date: Tue Jul 15 23:12:15 2008
New Revision: 677164

URL: http://svn.apache.org/viewvc?rev=677164&view=rev
Log:
Fixed what looks like a potential NPE source

Modified:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=677164&r1=677163&r2=677164&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java Tue Jul 15 23:12:15 2008
@@ -1561,7 +1561,7 @@
             List listThrusOnly = EntityUtil.filterOutByCondition(listOrdered, EntityCondition.makeCondition("purchaseThruDate", EntityOperator.EQUALS, null));
             if (listThrusOnly.size() > 0) {
                 productContent = (GenericValue) listThrusOnly.get(0);  
-            } else {
+            } else if (listOrdered.size() > 0) {
                 productContent = (GenericValue) listOrdered.get(0);  
             }
         } catch(GenericEntityException e) {