Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8011930

Long.parseLong(String, int) has inaccurate limit on radix for using 'L'

XMLWordPrintable

    • b87
    • generic
    • generic
    • Verified

      A DESCRIPTION OF THE PROBLEM :
      The documentation for Long.parseLong(String s, int radix) indicates that the letter 'L' or 'l' may not be in the string, " except that either L or l may appear as a digit for a radix greater than 22. " L and l can also appear if the radix is equal to 22; this should be " greater than or equal " . The same error is in the documentation of Long.valueOf(String s, int radix).

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
       " except that either L or l may appear as a digit for a radix greater than or equal to 22. "
      ACTUAL -
       " except that either L or l may appear as a digit for a radix greater than 22. "

      URL OF FAULTY DOCUMENTATION :
      http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html#parseLong%28java.lang.String,%20int%29

            darcy Joe Darcy
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: