Details
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)
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
 csr for

JDK8208071 [FmtCh] Implementation of ChoiceFormat math methods should delegate to java.lang.Math methods
 Closed
 relates to

JDK8208560 ChoiceFormat class has unused constants needs cleanup
 Closed

JDK8021108 Clean up doclint warnings and errors in java.text package
 Resolved