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

NumberUtils#createNumber() returns positive BigDecimal when negative Float is expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.x
    • 3.4
    • lang.math.*
    • None

    Description

      NumberUtils.createNumber("-0.0") returns BigDecimal with 0 signum.
      Caused by the implementation not checking for sign when extracting mantissa from the input string.

      Expected is that negative Float is returned.

      Attachments

        1. lang-1087-patch1.diff
          3 kB
          Renat Zhilkibaev

        Activity

          People

            britter Benedikt Ritter
            renat Renat Zhilkibaev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: