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

NumberUtils.isNumber bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Not A Bug
    • 3.6
    • 3.7
    • lang.math.*
    • None

    Description

      hi,I used to NumberUtils.isNumber()[version:3.6] find this error, this error is mainly caused by method isCreatable() in the 723 line of code。
      See below for details:

      String str = "0927";
      System.out.println(NumberUtils.isNumber(str));
      //result:false

      String str1 = "9027";
      System.out.println(NumberUtils.isNumber(str1));
      //result:true

      Attachments

        Activity

          People

            Unassigned Unassigned
            yusw yusw
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: