Skip to content

Commit

Permalink
Merge pull request spring-projects#40494 from dukbong
Browse files Browse the repository at this point in the history
* pr/40494:
  Polish "Remove unnecessary nesting of calls to String.format"
  Remove unnecessary nesting of calls to String.format

Closes spring-projectsgh-40494
  • Loading branch information
mhalbritter committed Apr 24, 2024
2 parents ee6677b + 2cb19f3 commit 178d3ca
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ 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 178d3ca

Please sign in to comment.