JDK 8 code review request for 7091682 "Move sun.misc.FpUtils code into java.lang.Math"
Alan.Bateman at oracle.com
Sat Sep 17 05:56:46 PDT 2011
joe.darcy at oracle.com wrote:
> Please review the changes to address
> 7091682 "Move sun.misc.FpUtils code into java.lang.Math"
> As implied by the synopsis, where appropriate JDK-implementation code
> used to provide functionality in java.lang.Math and
> java.lang.StrictMath is moved out of sun.misc.* and into
> java.lang.Math. Uses of methods available in java.lang.Math and
> switched to that entry point as opposed to the sun.misc one.
> Additionally, the sun.misc methods whose implementation was moved were
> also deprecated.
> Later in JDK 8, I will probably add some of the remaining
> un-deprecated methods in sun.misc.FpUtils as java.lang.Math/StrictMath
Looks good to me. Some of the if-then-elses are a bit inconsistent but
no big deal. I did a quick search through the repository and I see that
java.util.Formatter uses FpUtils.getExponent and scalb and maybe they
should be changed to use Math.
More information about the core-libs-dev