Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2847

BigDecimalType incorrectly prints scientific notation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.9
    • Fix Version/s: 2.2.10
    • Component/s: Aegis Databinding
    • Labels:
      None

      Description

      By the SOAP spec, types of "decimal" are not supposed to use scientific notation (http://www.w3.org/TR/xmlschema-2/#decimal).

      However if the value of a BigDecimal is small enough, the toString() method (used by the BigDecimalType class) will print using scientific notation.

      Instead, this type mapper should use the toPlainString() method to ensure no scientific notation is used.

      I have attached a patch and an example to what i am referring. I don't have an actual unit test for the BigDecimalType class itself.

      -B

        Attachments

        1. BigDecimalType.java.patch
          0.6 kB
          Bryan Stopp
        2. BigDecimalStringTest.java
          0.4 kB
          Bryan Stopp

          Issue Links

            Activity

              People

              • Assignee:
                bmargulies Benson Margulies
                Reporter:
                panth13 Bryan Stopp
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: