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

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 8
    • core-libs
    • b05
    • generic
    • generic

      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)

            nishjain Nishit Jain
            darcy Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: