Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-693

Method createNumber from NumberUtils doesn't work for floating point numbers other than Float

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6
    • 3.2
    • lang.math.*
    • None

    Description

      Method createNumber from NumberUtils is trying to parse a string with a floating point number always first as a Float, that will cause that if we send a string with a number that will need a Double or even a BigDecimal the number will be truncate to accommodate into the Float without an exception to be thrown, so in fact we will no be returning ever neither a Double nor a BigDecimal.

      Attachments

        1. LANG-693(2).patch
          4 kB
          Calvin Echols

        Activity

          People

            Unassigned Unassigned
            rego Carlos Rego
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: