You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2012/11/07 19:31:57 UTC
svn commit: r1406748 - in /ofbiz/branches/release11.04: ./
applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
Author: jleroux
Date: Wed Nov 7 18:31:56 2012
New Revision: 1406748
URL: http://svn.apache.org/viewvc?rev=1406748&view=rev
Log:
"Applied fix from trunk for revision: 1406727"
------------------------------------------------------------------------
r1406727 | jleroux | 2012-11-07 18:36:07 +0100 (mer., 07 nov. 2012) | 5 lines
A patch from Leon for "slight update to ShoppingCartEvents.loadCartFromQuote to avoid NPE exception" https://issues.apache.org/jira/browse/OFBIZ-5068
There's a quote within that one product has been released and no valid price set. If try to create order from this quote, NPE exception raised.
=> Check the result return from runSync("loadCartFromQuote")
------------------------------------------------------------------------
Modified:
ofbiz/branches/release11.04/ (props changed)
ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
Propchange: ofbiz/branches/release11.04/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1406727
Modified: ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1406748&r1=1406747&r2=1406748&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Wed Nov 7 18:31:56 2012
@@ -1341,6 +1341,10 @@ public class ShoppingCartEvents {
UtilMisc.<String, Object>toMap("quoteId", quoteId,
"applyQuoteAdjustments", "true",
"userLogin", userLogin));
+ if (!ServiceUtil.isSuccess(outMap)) {
+ request.setAttribute("_ERROR_MESSAGE_", ServiceUtil.getErrorMessage(outMap));
+ return "error";
+ }
cart = (ShoppingCart) outMap.get("shoppingCart");
} catch (GenericServiceException exc) {
request.setAttribute("_ERROR_MESSAGE_", exc.getMessage());