You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Alexander Reelsen (Created) (JIRA)" <ji...@apache.org> on 2012/03/19 09:13:41 UTC
[jira] [Created] (OFBIZ-4733) Xml Deserializer does not support
BigDecimal
Xml Deserializer does not support BigDecimal
--------------------------------------------
Key: OFBIZ-4733
URL: https://issues.apache.org/jira/browse/OFBIZ-4733
Project: OFBiz
Issue Type: Bug
Components: framework
Affects Versions: SVN trunk
Reporter: Alexander Reelsen
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
Patch is:
--- a/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java Fri Mar 16 16:32:16 2012 +0100
+++ b/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java Mon Mar 19 09:08:17 2012 +0100
@@ -300,6 +300,9 @@
} else if ("std-Integer".equals(tagName)) {
String valStr = element.getAttribute("value");
return Integer.valueOf(valStr);
+ } else if ("std-BigDecimal".equals(tagName)) {
+ String valStr = element.getAttribute("value");
+ return new BigDecimal(valStr);
} else if ("std-Long".equals(tagName)) {
String valStr = element.getAttribute("value");
return Long.valueOf(valStr);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (OFBIZ-4733) Xml Deserializer does not support
BigDecimal
Posted by "Jacques Le Roux (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OFBIZ-4733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Le Roux closed OFBIZ-4733.
----------------------------------
Resolution: Fixed
Fix Version/s: SVN trunk
Thanks Alexander,
As it was a tiny one, I have applied your change directly in code at r1302324 in trunk.
But please next time provide a valid svn patch and attach it following [instructions|https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices#OFBizContributorsBestPractices-HowtoSendinYourContributions(orhowtocreateandapplypatches)]
> Xml Deserializer does not support BigDecimal
> --------------------------------------------
>
> Key: OFBIZ-4733
> URL: https://issues.apache.org/jira/browse/OFBIZ-4733
> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Affects Versions: SVN trunk
> Reporter: Alexander Reelsen
> Assignee: Jacques Le Roux
> Fix For: SVN trunk
>
>
> 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
> Patch is:
> --- a/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java Fri Mar 16 16:32:16 2012 +0100
> +++ b/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java Mon Mar 19 09:08:17 2012 +0100
> @@ -300,6 +300,9 @@
> } else if ("std-Integer".equals(tagName)) {
> String valStr = element.getAttribute("value");
> return Integer.valueOf(valStr);
> + } else if ("std-BigDecimal".equals(tagName)) {
> + String valStr = element.getAttribute("value");
> + return new BigDecimal(valStr);
> } else if ("std-Long".equals(tagName)) {
> String valStr = element.getAttribute("value");
> return Long.valueOf(valStr);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (OFBIZ-4733) Xml Deserializer does not support
BigDecimal
Posted by "Jacques Le Roux (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OFBIZ-4733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Le Roux reassigned OFBIZ-4733:
--------------------------------------
Assignee: Jacques Le Roux
> Xml Deserializer does not support BigDecimal
> --------------------------------------------
>
> Key: OFBIZ-4733
> URL: https://issues.apache.org/jira/browse/OFBIZ-4733
> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Affects Versions: SVN trunk
> Reporter: Alexander Reelsen
> Assignee: Jacques Le Roux
>
> 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
> Patch is:
> --- a/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java Fri Mar 16 16:32:16 2012 +0100
> +++ b/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java Mon Mar 19 09:08:17 2012 +0100
> @@ -300,6 +300,9 @@
> } else if ("std-Integer".equals(tagName)) {
> String valStr = element.getAttribute("value");
> return Integer.valueOf(valStr);
> + } else if ("std-BigDecimal".equals(tagName)) {
> + String valStr = element.getAttribute("value");
> + return new BigDecimal(valStr);
> } else if ("std-Long".equals(tagName)) {
> String valStr = element.getAttribute("value");
> return Long.valueOf(valStr);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira