Author: sascharodekamp Date: Thu Mar 29 07:51:00 2012 New Revision: 1306742
URL: http://svn.apache.org/viewvc?rev=1306742&view=rev Log: ProductStoreCartAwareEvents: wrong check for website in setSessionProductStore (https://issues.apache.org/jira/browse/OFBIZ-4744). A patch from Michael Brohl: There's a duplicate check if the productStore is null instead of checking productStore and website in ProductStoreCartAwareEvents.setSessionProductStore. Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java?rev=1306742&r1=1306741&r2=1306742&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java Thu Mar 29 07:51:00 2012 @@ -80,7 +80,7 @@ public class ProductStoreCartAwareEvents // make sure ProductStore change is allowed for the WebSite GenericValue webSite = WebSiteWorker.getWebSite(request); - if (productStore == null) { + if (webSite == null) { throw new IllegalArgumentException("Cannot set session ProductStore, could not find WebSite record based on web.xml setting."); } String allowProductStoreChange = webSite.getString("allowProductStoreChange");

