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

Duplicated "0x" check in createBigInteger in NumberUtils

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3.2
    • 3.4
    • lang.math.*
    • None

    Description

      I think there is typo in below line:

      org.apache.commons.lang3.math.NumberUtils.java
       if (str.startsWith("0x", pos) || str.startsWith("0x", pos)) { // hex
                  radix = 16;
                  pos += 2;
      }
      

      The second "0x" should be "0X"

      org.apache.commons.lang3.math.NumberUtils.java
       if (str.startsWith("0x", pos) || str.startsWith("0X", pos)) { // hex
                  radix = 16;
                  pos += 2;
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            lihy70 haiyang li
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: