From 6cc685034ecc0baf74171a77cb03a0ba861a44a1 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Wed, 23 Mar 2022 15:18:56 +0100 Subject: [PATCH] Polishing --- .../src/main/java/org/springframework/http/HttpStatus.java | 2 +- .../main/java/org/springframework/http/HttpStatusCode.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/http/HttpStatus.java b/spring-web/src/main/java/org/springframework/http/HttpStatus.java index af1d1876dd..7d878f936d 100644 --- a/spring-web/src/main/java/org/springframework/http/HttpStatus.java +++ b/spring-web/src/main/java/org/springframework/http/HttpStatus.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-web/src/main/java/org/springframework/http/HttpStatusCode.java b/spring-web/src/main/java/org/springframework/http/HttpStatusCode.java index 4f76278e69..d92c89964e 100644 --- a/spring-web/src/main/java/org/springframework/http/HttpStatusCode.java +++ b/spring-web/src/main/java/org/springframework/http/HttpStatusCode.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ import org.springframework.util.Assert; /** * Represents an HTTP response status code. Implemented by {@link HttpStatus}, - * but defined as interface to allow for values not in that enumeration. + * but defined as an interface to allow for values not in that enumeration. * * @author Arjen Poutsma * @since 6.0 @@ -83,7 +83,7 @@ public sealed interface HttpStatusCode permits DefaultHttpStatusCode, HttpStatus * positive number */ static HttpStatusCode valueOf(int code) { - Assert.isTrue(code >= 100 && code <= 999, "Code '" + code + "' should be a thee-digit positive integer"); + Assert.isTrue(code >= 100 && code <= 999, () -> "Code '" + code + "' should be a three-digit positive integer"); HttpStatus status = HttpStatus.resolve(code); if (status != null) { return status;