Skip to content

Commit

Permalink
Deprecated since jdk9 replacing constructor instance of Double and Float
Browse files Browse the repository at this point in the history
Replacing Deprecated datatype constructors
  • Loading branch information
RahulNagekar committed Apr 23, 2020
1 parent 571215c commit 4859dcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/junit/framework/Assert.java
Expand Up @@ -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));
}
}

Expand All @@ -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));
}
}

Expand Down

0 comments on commit 4859dcb

Please sign in to comment.