Skip to content

Commit

Permalink
Remove unnecessary nesting of calls to String.format
Browse files Browse the repository at this point in the history
  • Loading branch information
dukbong authored and mhalbritter committed Apr 24, 2024
1 parent ee6677b commit 0cf15fc
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ Instant toInstant() {
.truncatedTo(ChronoUnit.SECONDS)
.toInstant();
if (instant.isBefore(DATE_MIN) || instant.isAfter(DATE_MAX)) {
throw new IllegalArgumentException(String
.format(String.format("'%s' is not within the valid range %s to %s", instant, DATE_MIN, DATE_MAX)));
throw new IllegalArgumentException(String.format("'%s' is not within the valid range %s to %s", instant, DATE_MIN, DATE_MAX));
}
return instant;
}
Expand Down

0 comments on commit 0cf15fc

Please sign in to comment.