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

{Float, Double}.valueOf erroneously accepts integer strings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 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

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: