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

NumberUtils.isNumber bug

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Not A Bug
    • Affects Version/s: 3.6
    • Fix Version/s: 3.7
    • Component/s: lang.math.*
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: