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

NumberUtils.isNumber bug

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 3.5
    • Component/s: lang.math.*
    • Labels:
      None
    • Flags:
      Patch

      Description

      I found that when using NumberUtils【org.apache.commons.lang3.math.NumberUtils.isNumber(version3.4)】 isNumber method the following phenomenon,
      when the parameter is 1.0 is true, but when the parameter is 0.1 is displayed is false.
      When I use 0.1 as the parameter tuning isNumber method,
      view the source code in the method of the method of line 1370 discovered a problem.
      When the analytical parameter is ". ", this time the chars [I] value is 46, direct return false.
      I think to do so is not very reasonable, please give me your guidance.

        Attachments

          Activity

            People

            • Assignee:
              pascalschumacher Pascal Schumacher
              Reporter:
              yusw yusw
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: