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

[Fmt-Ch] Implementation of ChoiceFormat math methods should delegate to java.lang.Math methods

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 12
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b05
    • CPU:
      generic
    • OS:
      generic

      Description

      The java.text.ChoiceFormat class has a number of double manipulation methods which have similar functionality to methods now found in java.lang.Math. As the methods in java.lang.Math and known to be well tested, and presumed to be more widely used, where possible the implementations of the ChoiceFormat method should delegate to the corresponding methods in java.lang.Math.

      For example, the ChoiceFormat.nextDouble method is equivalent to Math.nextUp, ChoiceFormat.nextDouble is equivalent to Math.nextDown, etc. Finally, ChoiceFormat.nextDouble(d, bool) is equivalent to
      Math.nextAfter(d, bool? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nishjain Nishit Jain (Inactive)
                Reporter:
                darcy Joe Darcy
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: