Skip to content

Commit

Permalink
Remove useless call to String.format()
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Apr 13, 2024
1 parent ab492c7 commit 2c35b9c
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ private static void checkCalculatedProbability(final double probability) {
// exp(-1/Integer.MAX_INT) approx 0.9999999995343387 so Math.pow( x, y ) will
// always be 0<x<1 and y>0
if (probability >= 1.0) {
throw new IllegalArgumentException(
String.format("Calculated probability is greater than or equal to 1: " + probability));
throw new IllegalArgumentException("Calculated probability is greater than or equal to 1: " + probability);
}
}

Expand Down

0 comments on commit 2c35b9c

Please sign in to comment.