8157821: [JITtester] OptionResolver and LiteralFactory use deprecated c-tors

Reviewed-by: kvn
This commit is contained in:
Igor Ignatyev 2016-05-27 17:12:10 +03:00
parent 1b5b717f54
commit 05540f90da
2 changed files with 4 additions and 4 deletions

View file

@ -51,13 +51,13 @@ class LiteralFactory extends Factory<Literal> {
} else if (resultType.equals(TypeList.LONG)) { } else if (resultType.equals(TypeList.LONG)) {
literal = new Literal((long) (PseudoRandom.random() * Long.MAX_VALUE), TypeList.LONG); literal = new Literal((long) (PseudoRandom.random() * Long.MAX_VALUE), TypeList.LONG);
} else if (resultType.equals(TypeList.FLOAT)) { } else if (resultType.equals(TypeList.FLOAT)) {
literal = new Literal(new Float(String.format( literal = new Literal(Float.valueOf(String.format(
(Locale) null, (Locale) null,
"%." + ProductionParams.floatingPointPrecision.value() + "EF", "%." + ProductionParams.floatingPointPrecision.value() + "EF",
(float) PseudoRandom.random() * Float.MAX_VALUE)), (float) PseudoRandom.random() * Float.MAX_VALUE)),
TypeList.FLOAT); TypeList.FLOAT);
} else if (resultType.equals(TypeList.DOUBLE)) { } else if (resultType.equals(TypeList.DOUBLE)) {
literal = new Literal(new Double(String.format( literal = new Literal(Double.valueOf(String.format(
(Locale) null, (Locale) null,
"%." + 2 * ProductionParams.floatingPointPrecision.value() + "E", "%." + 2 * ProductionParams.floatingPointPrecision.value() + "E",
PseudoRandom.random() * Double.MAX_VALUE)), PseudoRandom.random() * Double.MAX_VALUE)),

View file

@ -230,7 +230,7 @@ public class OptionResolver {
@Override @Override
public Long parseFromString(String arg) { public Long parseFromString(String arg) {
return new Long(arg); return Long.valueOf(arg);
} }
} }
@ -242,7 +242,7 @@ public class OptionResolver {
@Override @Override
public Integer parseFromString(String arg) { public Integer parseFromString(String arg) {
return new Integer(arg); return Integer.valueOf(arg);
} }
} }