From 4903fee9392d50c18a1421e6e768210750d22011 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Tue, 26 Aug 2025 11:01:29 +0200 Subject: [PATCH] =?UTF-8?q?Permit=20@=E2=81=A0Nullable=20value=20in=20Resp?= =?UTF-8?q?onseCookie=20from*()=20factory=20methods?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes gh-35377 --- .../java/org/springframework/http/ResponseCookie.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/http/ResponseCookie.java b/spring-web/src/main/java/org/springframework/http/ResponseCookie.java index 44b0eaa7eac..5cdc8e1eed7 100644 --- a/spring-web/src/main/java/org/springframework/http/ResponseCookie.java +++ b/spring-web/src/main/java/org/springframework/http/ResponseCookie.java @@ -211,7 +211,7 @@ public final class ResponseCookie extends HttpCookie { * @return a builder to create the cookie with * @since 6.0 */ - public static ResponseCookieBuilder from(final String name) { + public static ResponseCookieBuilder from(String name) { return new DefaultResponseCookieBuilder(name, null, false); } @@ -222,7 +222,7 @@ public final class ResponseCookie extends HttpCookie { * @param value the cookie value * @return a builder to create the cookie with */ - public static ResponseCookieBuilder from(final String name, final String value) { + public static ResponseCookieBuilder from(String name, @Nullable String value) { return new DefaultResponseCookieBuilder(name, value, false); } @@ -236,7 +236,7 @@ public final class ResponseCookie extends HttpCookie { * @return a builder to create the cookie with * @since 5.2.5 */ - public static ResponseCookieBuilder fromClientResponse(final String name, final String value) { + public static ResponseCookieBuilder fromClientResponse(String name, @Nullable String value) { return new DefaultResponseCookieBuilder(name, value, true); } @@ -425,7 +425,7 @@ public final class ResponseCookie extends HttpCookie { @Nullable private String sameSite; - public DefaultResponseCookieBuilder(String name, @Nullable String value, boolean lenient) { + DefaultResponseCookieBuilder(String name, @Nullable String value, boolean lenient) { this.name = name; this.value = value; this.lenient = lenient;