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

{Float, Double}.valueOf erroneously accepts integer strings

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 5.0
    • 1.1.4, 1.2.0, 1.4.0, 1.4.2
    • core-libs
    • None
    • tiger
    • generic, x86, sparc
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: