8157821: [JITtester] OptionResolver and LiteralFactory use deprecated c-tors
authoriignatyev
Fri, 27 May 2016 17:12:10 +0300
changeset 39235 0a8a53391399
parent 39234 d48ea2ff9c02
child 39236 c9d756fa846e
8157821: [JITtester] OptionResolver and LiteralFactory use deprecated c-tors Reviewed-by: kvn
hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/LiteralFactory.java
hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/utils/OptionResolver.java
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/LiteralFactory.java	Fri May 27 17:12:09 2016 +0300
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/LiteralFactory.java	Fri May 27 17:12:10 2016 +0300
@@ -51,13 +51,13 @@
         } 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)),
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/utils/OptionResolver.java	Fri May 27 17:12:09 2016 +0300
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/utils/OptionResolver.java	Fri May 27 17:12:10 2016 +0300
@@ -230,7 +230,7 @@
 
         @Override
         public Long parseFromString(String arg) {
-            return new Long(arg);
+            return Long.valueOf(arg);
         }
     }
 
@@ -242,7 +242,7 @@
 
         @Override
         public Integer parseFromString(String arg) {
-            return new Integer(arg);
+            return Integer.valueOf(arg);
         }
     }