You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2009/09/03 15:00:58 UTC
[jira] Closed: (OFBIZ-2782) loadCartFromOrder assumes service call
is successful
[ https://issues.apache.org/jira/browse/OFBIZ-2782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Le Roux closed OFBIZ-2782.
----------------------------------
Resolution: Fixed
Fix Version/s: SVN trunk
Release Branch 9.04
Assignee: Jacques Le Roux
Thanks Bob,
Your patch is in trunk at r810921, R9.04 at r810922.
> loadCartFromOrder assumes service call is successful
> ----------------------------------------------------
>
> Key: OFBIZ-2782
> URL: https://issues.apache.org/jira/browse/OFBIZ-2782
> Project: OFBiz
> Issue Type: Bug
> Components: order
> Affects Versions: SVN trunk
> Reporter: Bob Morley
> Assignee: Jacques Le Roux
> Fix For: Release Branch 9.04, SVN trunk
>
> Attachments: loaderrorhandling.diff
>
>
> In ShoppingCartEvents.loadCartfromOrder a call to a service named "loadCartFromOrder" is performed. If this service results in an error (but does not throw an exception) the system will retrieve a null ShoppingCart object and ultimately fail with a null reference exception.
> The simple change is to check that the service call was successful -- if it is not successful, the event sets the error message (from the service error message) and returns an error. A patch file will be attached with the fix.
> *Note* I had added a helper function to ServiceUtil called "isSuccess" which is used here as well. This removes the need for the "if (error || failure)" pattern that is pretty pervasive in the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.