svn commit: r1302324 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1302324 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java

jleroux@apache.org
Author: jleroux
Date: Mon Mar 19 08:48:03 2012
New Revision: 1302324

URL: http://svn.apache.org/viewvc?rev=1302324&view=rev
Log:
A change from Alexander Reelsen  "Xml Deserializer does not support BigDecimal" https://issues.apache.org/jira/browse/OFBIZ-4733

In the last weeks the XML Serializer in trunk was extended to support BigDecimal. Unfortunately deserializing is not supported, which leads to services being broken when running via async as their are persisted in runtime_data... like sending mails, when a bigdecimal is involved

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java?rev=1302324&r1=1302323&r2=1302324&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java Mon Mar 19 08:48:03 2012
@@ -309,6 +309,9 @@ public class XmlSerializer {
             } else if ("std-Double".equals(tagName)) {
                 String valStr = element.getAttribute("value");
                 return Double.valueOf(valStr);
+            } else if ("std-BigDecimal".equals(tagName)) {
+                String valStr = element.getAttribute("value");
+                return new BigDecimal(valStr);
             } else if ("std-Boolean".equals(tagName)) {
                 String valStr = element.getAttribute("value");
                 return Boolean.valueOf(valStr);