Login  Register

[jira] [Created] (OFBIZ-11985) Add a new NumberConverter to convert Integer to BigInteger

Posted by Nicolas Malin (Jira) on Aug 27, 2020; 4:18pm
URL: http://ofbiz.116.s1.nabble.com/jira-Created-OFBIZ-11985-Add-a-new-NumberConverter-to-convert-Integer-to-BigInteger-tp4758605.html

Girish Vasmatkar created OFBIZ-11985:
----------------------------------------

             Summary: Add a new NumberConverter to convert Integer to BigInteger
                 Key: OFBIZ-11985
                 URL: https://issues.apache.org/jira/browse/OFBIZ-11985
             Project: OFBiz
          Issue Type: Sub-task
          Components: ALL PLUGINS
    Affects Versions: Trunk
            Reporter: Girish Vasmatkar


Create a new NumberConverter allowing conversion from java.lang.Integer to java.math.BigInteger. 

JSON number value is parsed as Integer by default and in order to pass the value to a  service attribute defined as BigInteger, conversion is necessary in order to avoid type mismatch error.
{code:java}
java.lang.ClassNotFoundException: No converter found for java.lang.Integer->java.math.BigInteger
        at org.apache.ofbiz.base.conversion.Converters.getConverter(Converters.java:119) ~[main/:?]
{code}
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)