From 0cf15fcad00c5eeb9df92185fc3496ca9b3a689a Mon Sep 17 00:00:00 2001 From: Hyeon Sung Date: Wed, 24 Apr 2024 09:14:55 +0900 Subject: [PATCH] Remove unnecessary nesting of calls to String.format See gh-40494 --- .../springframework/boot/maven/MavenBuildOutputTimestamp.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/MavenBuildOutputTimestamp.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/MavenBuildOutputTimestamp.java index 702677bba9..5ddb827437 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/MavenBuildOutputTimestamp.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/MavenBuildOutputTimestamp.java @@ -91,8 +91,7 @@ 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; }