Author: ashish
Date: Tue Mar 12 04:51:28 2013
New Revision: 1455407
URL:
http://svn.apache.org/r1455407Log:
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.
Modified:
ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java
Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java?rev=1455407&r1=1455406&r2=1455407&view=diff==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java Tue Mar 12 04:51:28 2013
@@ -191,7 +191,7 @@ public class ServiceEcaAction implements
}
// 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));