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
  • Loading branch information
RahulNagekar committed Apr 18, 2020
1 parent 571215c commit caaab0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/junit/framework/Assert.java
Original file line number Diff line number Diff line change
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 caaab0f

Please sign in to comment.