svn commit: r780589 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java

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

svn commit: r780589 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java

jleroux@apache.org
Author: jleroux
Date: Mon Jun  1 08:42:11 2009
New Revision: 780589

URL: http://svn.apache.org/viewvc?rev=780589&view=rev
Log:
Small formatting (in Eclipse, using Sun Java conventions formatter as basis, I widened lines widths from 80 to 132)

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java?rev=780589&r1=780588&r2=780589&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java Mon Jun  1 08:42:11 2009
@@ -92,15 +92,20 @@
 
     public static String getStoreCurrencyUomId(HttpServletRequest request) {
         GenericValue productStore = getProductStore(request);
-        return UtilHttp.getCurrencyUom(request.getSession(), productStore.getString("defaultCurrencyUomId"));
+        if (UtilValidate.isEmpty(productStore)) {
+            Debug.logError(
+                    "No product store found in request, cannot set CurrencyUomId!", module);
+            return null;
+        } else {
+            return UtilHttp.getCurrencyUom(request.getSession(), productStore.getString("defaultCurrencyUomId"));
+        }
     }
 
     public static Locale getStoreLocale(HttpServletRequest request) {
         GenericValue productStore = getProductStore(request);
         if (UtilValidate.isEmpty(productStore)) {
             Debug.logError(
-                    "No product store found in request, cannot set locale!",
-                    module);
+                    "No product store found in request, cannot set locale!", module);
             return null;
         } else {
             return UtilHttp.getLocale(request, request.getSession(), productStore.getString("defaultLocaleString"));