Author: sascharodekamp
Date: Thu Mar 29 07:50:48 2012
New Revision: 1306740

URL: http://svn.apache.org/viewvc?rev=1306740&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/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java

Modified: 
ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java?rev=1306740&r1=1306739&r2=1306740&view=diff
==============================================================================
--- 
ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java
 (original)
+++ 
ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java
 Thu Mar 29 07:50:48 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");


Reply via email to