Why were the label files changed in this commit? This commit makes the order component dependent on a special purpose component.

-Adrian

On 1/5/2013 8:34 AM, jler...@apache.org wrote:
Author: jleroux
Date: Sat Jan  5 08:34:12 2013
New Revision: 1429234

URL: http://svn.apache.org/viewvc?rev=1429234&view=rev
Log:
A patch from Praveen Agrawal "Implementing Try-Catch while Adding UiLabel 
Resources" https://issues.apache.org/jira/browse/OFBIZ-5119

In OrderServices.java in method 'sendOrderNotificationScreen (Line :2427) a try 
catch block must be there surrounding to Adding UiLabel resources to map. So 
that if any of the resource is not found then rest of the code does not fail.

Modified:
     
ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/order/OrderServices.java

Modified: 
ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1429234&r1=1429233&r2=1429234&view=diff
==============================================================================
--- 
ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/order/OrderServices.java
 (original)
+++ 
ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/order/OrderServices.java
 Sat Jan  5 08:34:12 2013
@@ -2425,9 +2425,14 @@ public class OrderServices {
              locale = Locale.getDefault();
          }
- ResourceBundleMapWrapper uiLabelMap = (ResourceBundleMapWrapper) UtilProperties.getResourceBundleMap("EcommerceUiLabels", locale);
-        uiLabelMap.addBottomResourceBundle("OrderUiLabels");
-        uiLabelMap.addBottomResourceBundle("CommonUiLabels");
+        ResourceBundleMapWrapper uiLabelMap = null;
+        try {
+            uiLabelMap = (ResourceBundleMapWrapper) 
UtilProperties.getResourceBundleMap("CommonUiLabels", locale);
+            uiLabelMap.addBottomResourceBundle("EcommerceUiLabels");
+            uiLabelMap.addBottomResourceBundle("OrderUiLabels");
+        } catch (IllegalArgumentException e) {
+            Debug.logError(e, "Error adding resource bundle: " + e.toString(), 
module);
+        }
Map bodyParameters = UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId, "userLogin", placingUserLogin, "uiLabelMap", uiLabelMap, "locale", locale);
          if (placingParty!= null) {



Reply via email to