Permalink
Browse files

Bug Fix: Added check to avoid NPE if result-to-result is true.

If we set result-to-result true then for some cases actionResult may be empty so it throws an NPE action while executing eca action. Thanks Deepak.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1455407 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent e4172b0 commit f6e87647df07316a91393a77779ec5928578b2d7 Ashish Vijaywargiya committed Mar 12, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java
@@ -191,7 +191,7 @@ public boolean runAction(String selfService, DispatchContext dctx, Map<String, O
}
// copy/combine error messages on error/failure (!success) or on resultToResult to combine any error info coming out, regardless of success status
- if (!success || resultToResult) {
+ if ((!success || resultToResult) && UtilValidate.isNotEmpty(actionResult)) {
String errorMessage = (String) actionResult.get(ModelService.ERROR_MESSAGE);
String failMessage = (String) actionResult.get("failMessage");
List<? extends Object> errorMessageList = UtilGenerics.checkList(actionResult.get(ModelService.ERROR_MESSAGE_LIST));

0 comments on commit f6e8764

Please sign in to comment.