Polish "Reject empty strings in DurationFormatterUtils"

See gh-33669
This commit is contained in:
Stéphane Nicoll
2024-10-09 15:20:28 +02:00
parent 02c990ca82
commit e2238c0211
2 changed files with 16 additions and 26 deletions

View File

@@ -35,7 +35,6 @@ import org.springframework.util.StringUtils;
* @author Phillip Webb
* @author Valentine Wu
* @author Simon Baslé
* @author Kim Seungrae
* @since 6.2
*/
public abstract class DurationFormatterUtils {
@@ -90,7 +89,6 @@ public abstract class DurationFormatterUtils {
* @return the printed result
*/
public static String print(Duration value, DurationFormat.Style style, @Nullable DurationFormat.Unit unit) {
Assert.notNull(value, "Value must not be null");
return switch (style) {
case ISO8601 -> value.toString();
case SIMPLE -> printSimple(value, unit);