Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-1890

Numberconverter has issue with bigdecimal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.0, 1.2.2, 1.2.3
    • 1.2.10, 2.0.3
    • None
    • None

    Description

      Due to a potential bug in BigDecimal there is a bug, when you use BigDecimal
      with a NumberConverter.

      Like
      <tr:inputText value="#

      {bean.number}

      " ...>
      <tr:convertNumber />
      </tr:inputText>

      For instance, when the entered value is "333.111" the actual stored value is 333.1109999999999899955582804977893829345703125

      There is a mathematic explanation for that in here:
      http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems

      Attachments

        Issue Links

          Activity

            People

              matzew Matthias Wessendorf
              matzew Matthias Wessendorf
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: