Author: lektran
Date: Thu Nov 12 21:04:25 2009
New Revision: 835544

URL: http://svn.apache.org/viewvc?rev=835544&view=rev
Log:
Merged from trunk r835541
Don't attempt to cast Service Eca Set Field values to string after formatting, 
fixes ClassCastException caused by when using certain formats

Modified:
    
ofbiz/branches/release09.04/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java

Modified: 
ofbiz/branches/release09.04/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java?rev=835544&r1=835543&r2=835544&view=diff
==============================================================================
--- 
ofbiz/branches/release09.04/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java
 (original)
+++ 
ofbiz/branches/release09.04/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java
 Thu Nov 12 21:04:25 2009
@@ -70,11 +70,11 @@
                 valueMap = FastMap.newInstance();
             }
             // process the context changes
-            String newValue = null;
+            Object newValue = null;
             if (UtilValidate.isNotEmpty(this.value)) {
-                newValue = (String) this.format(this.value, context);
+                newValue = this.format(this.value, context);
             } else if (UtilValidate.isNotEmpty(this.envName) && 
context.get(this.envName) != null) {
-                newValue = (String) this.format((String) 
context.get(this.envName), context);
+                newValue = this.format((String) context.get(this.envName), 
context);
             }
             
             if (newValue != null) {


Reply via email to