test/java/lang/Double/ToHexString.java

Print this page

        

@@ -23,15 +23,17 @@
 
 /*
  * @test
  * @bug 4826774 4926547
  * @summary Tests for {Float, Double}.toHexString methods
+ * @library ../Math
+ * @build DoubleConsts
+ * @run main ToHexString
  * @author Joseph D. Darcy
  */
 
 import java.util.regex.*;
-import sun.misc.DoubleConsts;
 
 public class ToHexString {
     private ToHexString() {}
 
     /*

@@ -81,11 +83,11 @@
                 // Extract exponent
                 int exponent = Integer.parseInt(transString.substring(0,3), 16) -
                     DoubleConsts.EXP_BIAS;
                 result.append("0x");
 
-                if (exponent == DoubleConsts.MIN_EXPONENT - 1) { // zero or subnormal
+                if (exponent == Double.MIN_EXPONENT - 1) { // zero or subnormal
                     if(signifString.equals("0000000000000")) {
                         result.append("0.0p0");
                     }
                     else {
                         result.append("0." + signifString.replaceFirst("0+$", "").replaceFirst("^$", "0") +