Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5395

BigDecimal converted as double in ConverterUtil

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.1, 1.6.2
    • Fix Version/s: 1.6.3, 1.7.0
    • Component/s: adb, databinding
    • Labels:
      None
    • Environment:
      All

      Description

      Big Decimal are treated as double in org.apache.axis2.databinding.utils.converterUtil.java as no proto exists taking a BigDecimal as argument.

      This leads to loosing precision in the value in the xml content. We noticed that since more than one year (as we use 14 digits for some currency change) so, we use our own patched version :

      in org.apache.axis2.databinding.utils.converterUtil.java add a new method :

      public static String convertToString(BigDecimal o)

      { return o.toPlainString(); }

      This solved the problem. Could be enough, but we have to patch again the Converterutil class at each update to the latest version....

      So if something like that could be introduced in next versions ... could be nice !

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                serenne serenne
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: