Browse Source

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
3.1.x
Moritz Halbritter 2 years ago
parent
commit
178d3ca817
  1. 4
      spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/MavenBuildOutputTimestamp.java

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

@ -91,8 +91,8 @@ class MavenBuildOutputTimestamp { @@ -91,8 +91,8 @@ class MavenBuildOutputTimestamp {
.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;
}

Loading…
Cancel
Save