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

NumberUtils.createNumber() Javadoc says it does not work for octal numbers

    XMLWordPrintableJSON

Details

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

    Description

      The javadoc for NumberUtils.createNumber() states:

      "Values with leading 0's will not be interpreted as octal."

      However,

      assertEquals(25, NumberUtils.createNumber("0025"));

      fails, because NumberUtils.createNumber("0025") returns 21.

      Attachments

        Activity

          People

            Unassigned Unassigned
            michielgk Michiel Kalkman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: