Author: eckardjf
Date: Fri Jul 10 18:20:28 2009
New Revision: 793063
URL:
http://svn.apache.org/viewvc?rev=793063&view=revLog:
Applied fix from trunk for revision: 780589
described as a formatting change, actually fixed an NPE
------------------------------------------------------------------------
r780589 | jleroux | 2009-06-01 04:42:11 -0400 (Mon, 01 Jun 2009) | 1 line
Small formatting (in Eclipse, using Sun Java conventions formatter as basis, I widened lines widths from 80 to 132)
------------------------------------------------------------------------
Modified:
ofbiz/branches/release09.04/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java
Modified: ofbiz/branches/release09.04/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java?rev=793063&r1=793062&r2=793063&view=diff==============================================================================
--- ofbiz/branches/release09.04/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java (original)
+++ ofbiz/branches/release09.04/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java Fri Jul 10 18:20:28 2009
@@ -92,17 +92,24 @@
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);
+ Debug.logError(
+ "No product store found in request, cannot set locale!", module);
return null;
- } else {
- return UtilHttp.getLocale(request, request.getSession(), productStore.getString("defaultLocaleString"));
- }
+ } else {
+ return UtilHttp.getLocale(request, request.getSession(), productStore.getString("defaultLocaleString"));
+ }
}
public static String determineSingleFacilityForStore(GenericDelegator delegator, String productStoreId) {