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

Duplicated "0x" check in createBigInteger in NumberUtils

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.2
    • Fix Version/s: 3.4
    • Component/s: lang.math.*
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: