From 4859dcb10cc959b82e036c5db6c58ca144ed99bd Mon Sep 17 00:00:00 2001 From: RahulNagekar Date: Sat, 18 Apr 2020 19:06:52 +0530 Subject: [PATCH] Deprecated since jdk9 replacing constructor instance of Double and Float Replacing Deprecated datatype constructors --- src/main/java/junit/framework/Assert.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/junit/framework/Assert.java b/src/main/java/junit/framework/Assert.java index 663461c7ab79..d10cdb4247b6 100644 --- a/src/main/java/junit/framework/Assert.java +++ b/src/main/java/junit/framework/Assert.java @@ -117,7 +117,7 @@ static public void assertEquals(String message, double expected, double actual, return; } if (!(Math.abs(expected - actual) <= delta)) { - failNotEquals(message, new Double(expected), new Double(actual)); + failNotEquals(message, Double.valueOf(expected), Double.valueOf(actual)); } } @@ -139,7 +139,7 @@ static public void assertEquals(String message, float expected, float actual, fl return; } if (!(Math.abs(expected - actual) <= delta)) { - failNotEquals(message, new Float(expected), new Float(actual)); + failNotEquals(message, Float.valueOf(expected), Float.valueOf(actual)); } }