Login  Register

svn commit: r835541 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java

Posted by lektran on Nov 12, 2009; 8:57pm
URL: http://ofbiz.116.s1.nabble.com/svn-commit-r835541-ofbiz-trunk-framework-service-src-org-ofbiz-service-eca-ServiceEcaSetField-java-tp620563.html

Author: lektran
Date: Thu Nov 12 20:57:36 2009
New Revision: 835541

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

Modified:
    ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java?rev=835541&r1=835540&r2=835541&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java Thu Nov 12 20:57:36 2009
@@ -75,11 +75,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) {