Skip to content

Commit

Permalink
Deprecated since jdk9 replacing constructor instance of Double and Fl…
Browse files Browse the repository at this point in the history
…oat (#1660)

Replacing deprecated datatype constructors
  • Loading branch information
RahulNagekar authored Aug 2, 2020
1 parent 714019f commit 3a5c6b4
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 3a5c6b4

Please sign in to comment.