< prev index next >

test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/LiteralFactory.java

Print this page
rev 11296 : 8157821: [JITtester] OptionResolver and LiteralFactory use deprecated c-tors
Reviewed-by:

@@ -49,17 +49,17 @@
         } else if (resultType.equals(TypeList.INT)) {
             literal = new Literal((int) (PseudoRandom.random() * Integer.MAX_VALUE), TypeList.INT);
         } else if (resultType.equals(TypeList.LONG)) {
             literal = new Literal((long) (PseudoRandom.random() * Long.MAX_VALUE), TypeList.LONG);
         } else if (resultType.equals(TypeList.FLOAT)) {
-            literal = new Literal(new Float(String.format(
+            literal = new Literal(Float.valueOf(String.format(
                     (Locale) null,
                     "%." + ProductionParams.floatingPointPrecision.value() + "EF",
                     (float) PseudoRandom.random() * Float.MAX_VALUE)),
                     TypeList.FLOAT);
         } else if (resultType.equals(TypeList.DOUBLE)) {
-            literal = new Literal(new Double(String.format(
+            literal = new Literal(Double.valueOf(String.format(
                     (Locale) null,
                     "%." + 2 * ProductionParams.floatingPointPrecision.value() + "E",
                     PseudoRandom.random() * Double.MAX_VALUE)),
                     TypeList.DOUBLE);
         } else if (resultType.equals(TypeList.BYTE)) {
< prev index next >