Upgrade Servlet, JSP and WebSocket API versions

This commit updates the Spring Framework baseline for the Servlet, JSP
and WebSocket APIs.
This also removes the previously deprecated APIs in JSP `PageContext`
and guards against the deprecation of the `PushBuilder` API.

See gh-33918
This commit is contained in:
Brian Clozel
2024-11-19 18:04:29 +01:00
parent 1fb1801285
commit c28cbfd582
6 changed files with 10 additions and 42 deletions

View File

@@ -39,7 +39,6 @@ import org.springframework.http.MediaType;
import org.springframework.http.ResponseCookie;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ReflectionUtils;
/**
* Adapt {@link ServerHttpResponse} to the Servlet {@link HttpServletResponse}.
@@ -50,8 +49,6 @@ import org.springframework.util.ReflectionUtils;
*/
class ServletServerHttpResponse extends AbstractListenerServerHttpResponse {
private static final boolean IS_SERVLET61 = ReflectionUtils.findField(HttpServletResponse.class, "SC_PERMANENT_REDIRECT") != null;
private final HttpServletResponse response;
private final ServletOutputStream outputStream;
@@ -186,12 +183,7 @@ class ServletServerHttpResponse extends AbstractListenerServerHttpResponse {
cookie.setSecure(httpCookie.isSecure());
cookie.setHttpOnly(httpCookie.isHttpOnly());
if (httpCookie.isPartitioned()) {
if (IS_SERVLET61) {
cookie.setAttribute("Partitioned", "");
}
else {
cookie.setAttribute("Partitioned", "true");
}
cookie.setAttribute("Partitioned", "");
}
this.response.addCookie(cookie);
}