Skip to content

Commit 178d3ca

Browse files
committed
Merge pull request #40494 from dukbong
* pr/40494: Polish "Remove unnecessary nesting of calls to String.format" Remove unnecessary nesting of calls to String.format Closes gh-40494
2 parents ee6677b + 2cb19f3 commit 178d3ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/MavenBuildOutputTimestamp.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ Instant toInstant() {
9191
.truncatedTo(ChronoUnit.SECONDS)
9292
.toInstant();
9393
if (instant.isBefore(DATE_MIN) || instant.isAfter(DATE_MAX)) {
94-
throw new IllegalArgumentException(String
95-
.format(String.format("'%s' is not within the valid range %s to %s", instant, DATE_MIN, DATE_MAX)));
94+
throw new IllegalArgumentException(
95+
String.format("'%s' is not within the valid range %s to %s", instant, DATE_MIN, DATE_MAX));
9696
}
9797
return instant;
9898
}

0 commit comments

Comments
 (0)