diff --git a/src/main/java/org/apache/commons/math4/util/MathUtils.java b/src/main/java/org/apache/commons/math4/util/MathUtils.java index 303146597..10dc1fec0 100644 --- a/src/main/java/org/apache/commons/math4/util/MathUtils.java +++ b/src/main/java/org/apache/commons/math4/util/MathUtils.java @@ -59,7 +59,7 @@ public final class MathUtils { * @return the hash code */ public static int hash(double value) { - return new Double(value).hashCode(); + return Double.valueOf(value).hashCode(); } /** @@ -68,10 +68,10 @@ public final class MathUtils { * * @param x Value * @param y Value - * @return {@code new Double(x).equals(new Double(y))} + * @return {@code Double.valueOf(x).equals(Double.valueOf(y))} */ public static boolean equals(double x, double y) { - return new Double(x).equals(new Double(y)); + return Double.valueOf(x).equals(Double.valueOf(y)); } /**