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

{Float, Double}.valueOf erroneously accepts integer strings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.1.4, 1.2.0, 1.4.0, 1.4.2
    • Fix Version/s: 5.0
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      tiger
    • CPU:
      generic, x86, sparc
    • OS:
      generic, solaris_2.5, windows_2000

      Description

      The valueOf methods in Float and Double convert (essentially) strings of floating-point literals into floating-point values. The set of accepted strings does *not* include simple integer strings like "45". However, in clear violation of the specification, the current implementation accepts such strings instead of throwing a NumberFormatException.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              darcy Joe Darcy
              Reporter:
              darcy Joe Darcy
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: