1
0
mirror of synced 2026-08-06 18:27:45 +00:00

Support Serialization in Exceptions

Issue gh-16276
This commit is contained in:
Josh Cummings
2025-01-14 18:25:17 -07:00
parent 8e59fa1719
commit 244fd2eb51
66 changed files with 249 additions and 2 deletions
@@ -16,11 +16,16 @@
package org.springframework.security.web.firewall;
import java.io.Serial;
/**
* @author Luke Taylor
*/
public class RequestRejectedException extends RuntimeException {
@Serial
private static final long serialVersionUID = 7226768874760909859L;
public RequestRejectedException(String message) {
super(message);
}
@@ -353,6 +353,7 @@ public class SwitchUserWebFilter implements WebFilter {
this.switchUserMatcher = switchUserMatcher;
}
@SuppressWarnings("serial")
private static class SwitchUserAuthenticationException extends RuntimeException {
SwitchUserAuthenticationException(AuthenticationException exception) {
@@ -16,6 +16,8 @@
package org.springframework.security.web.server.firewall;
import java.io.Serial;
/**
* Thrown when a {@link org.springframework.web.server.ServerWebExchange} is rejected.
*
@@ -24,6 +26,9 @@ package org.springframework.security.web.server.firewall;
*/
public class ServerExchangeRejectedException extends RuntimeException {
@Serial
private static final long serialVersionUID = 904984955691607748L;
public ServerExchangeRejectedException(String message) {
super(message);
}